The displacement function of a rock thrown straight up in the air is given by f(t) = -2t2 + 15.7t meters, where t is measured in seconds. Find the total distance travelled by the rock when it reaches the ground.