Frances and Joyce decided to take a shortcut through the woods to go to their friend's house. When they went home they decided to take the long way around the woods to avoid getting muddy shoes. If the length of the shortcut is equal to the square root of the sum of the squares of the other two sides, what total distance did they walk?