Penetration of solar energetic protons into the magnetotail