Calculate path distance.