An ant lives on the surface of a regular square pyramid where all edges have length . It wishes to travel on the surface of the pyramid from the midpoint of a base edge to the midpoint of the opposite base edge. What is the length of the shortest such trip?