Calculate the length of the shortest path between the points A and B. There is the convex polygon that can not be crossed.