Lets have a cube (1x1x1 m) and two points (A and B) on it surface. How to calculate the shortest way from A to B ?

Thanks in advance.