I'm walking on sunshine, and it don't feel good – my eyes hurt!
Baku has plenty of sunshine. If you walk away from the sun, or at least perpendicular to its rays, it does not shine in your eyes. For this problem assume that the sun shines from the south. Walking west or east or in any direction between west and east with a northward component avoids looking into the sun. Your eyes will hurt if you walk in any direction with a southward component.
Baku also has many rectangular areas of shade, and staying in these protects your eyes regardless of which direction you walk in. For example, Figure L.1 shows two shaded areas.
Find the minimum distance you need to walk with the sun shining in your eyes to get from the contest location to the awards ceremony location.
:::align{center}

Figure L.1: Sample Input 1 and a path that minimizes the sun shining in your eyes.
:::