Under construction

Still being built. Things may change

Amulet Split

Interview

Time limit2sMemory limit1024 MB

Summary
Given a right triangle with legs X and Y on the axes, find the vertical line x that splits its area into two equal halves.
Level

Easy2 of 10

Topics
Math, Geometry
Solved
No attempts yet

Statement

Tina and Salamander need magic to return the last creature to the suitcase. After a long search, they found a magical amulet shaped like a right triangle. The amulet can be split into two parts, and its magical power is then divided equally between the parts. But the two parts must have equal area, or all of the amulet's power disappears.

Salamander and Tina placed the amulet on a plane so that its vertices are (0, 0), (XX, 0), and (0, YY). Salamander has a device with a very thin blade that can split the amulet along the vertical line x=constx=\text{const}. Find the value of xx that splits the amulet into two parts of equal area.

Input

A single line contains the numbers XX and YY, the coordinates of the amulet's vertices (1≤X,Y≤1091 \le X, Y \le 10^9).

Output

Print a single line with the coordinate xx where the amulet should be cut. The answer is accepted if its absolute or relative error does not exceed 10−610^{-6}.

Hint

The figure shows the case X=4X=4, Y=3Y=3. The line x=1.171572875x = 1.171572875 splits the amulet into two parts, each with area 3.

Examples1

  1. Example 1

    Input
    4 3
    
    Expected output
    1.171572875