World Championship in "Highlander"
At the LCS, the world championship final for the game "Highlander" is being broadcast live! A screen and projector have been set up at the "Coliseum," drawing a massive crowd of fans. Unfortunately, I arrived late, and the game was already underway.
I quickly visualized a coordinate system where the screen is represented by the segment AB, with endpoints at (0, 0) and (w, 0). The image is projected from a point located at (w/2, 5000), and I am positioned at (x, y). From point C, one can view the game if and only if point C has a positive y-coordinate, and the angles ABC and BAC do not exceed 135°.
I am free to move around the field, but I cannot cross the screen. What is the minimum distance I need to travel to reach a point where I can watch the game?
Input
The first line contains three integers: w, x, y (1 ≤ w ≤ 10^4, |x|, |y| ≤ 10^4) - representing the width of the screen and my initial coordinates.
Output
Output the minimum distance I need to travel to watch the game, with a precision of at least four decimal places.