A train starting from rest increases its speed from 0 to v with a constant acceleration a1, runs at this speed for some time, and finally comes to rest with constant deceleration a2. If the total distance travelled is 's' find the total time 't' required.