A train stops at two stations P and Q, which are 2km apart. It accelerates uniformly from P at 1meters per seconds squared for 5seconds, and maintains a constant speed for a time before decelerating uniformly to rest at Q. If the deceleration is 0.5metres per seconds squared, find the time for which the train is travelling at a constant speed.