distance calculate sum of speed.