Nuclear shell effects in neutron-rich nuclei around N=20 and N=32,34