Diameter and mean shortest path