A car accelerates uniformly from rest at a. After a certain time, its acceleration becomes -a. It continues to travel and stops finally. If the total displacement of the car is L, what is the total time of travel?

The answer is (4L/a)^(1/2). But why??

distance accelerating = (1/2)at^2

same distance de-accelerating
so L = a t^2
t = (L/a)^(1/2)
I do not agree with the 4