A car accelerates from rest at a constant rate of 3 metre per second square for some time. Then it retards at constant rate of 6 m per second square and comes to rest. If the total time for which it remains in motion is 3 seconds, what is the total distance travelled?