Company: Adobe OA
Difficulty: easy
The Arc That Stops the Circle A square of side S and a circle of radius S / 2 are rolling along the same road. The road is not flat: it carries two arcs joined end to end, rising out of the ground like two low humps side by side. When the circle reaches the point where the two arcs meet, the elevation in front of it is too steep to climb, so the circle stops advancing and simply spins in place. The square, however, keeps rolling over the arcs without trouble. The arcs are shaped so that this is exactly what happens, and so that the square fits them perfectly: as the square tips across an arc, its two lower corners come to rest precisely on the two ends of that arc. Given S , report the height of the top of the arc above the road — the distance from the highest point of the arc down to the flat road it rises from. Input Format The first line of input contains a single integer S , the side of the square. Output Format Print a single number, the height of the top of the arc above the road