A metro trains starts from rest and in $5 \,s$ achieves $108 \,km/h$. After that it moves with constant velocity and comes to rest after travelling $45 \,m$ with uniform retardation. If total distance travelled is $395 \,m$, find total time of travelling.