Longitudinal Stern-Gerlach effect with slow neutrons