Calculating percentage of total distance traveled