In order to calculate the distance traveled before changing directions, first let's calculate the acceleration using the second law of Newton (let's use a negative force, since it's opposite to the movement):
Then, we can calculate the distance traveled using Torricelli's equation:
Therefore the particle travels 6250 meters before changing the movement direction.