Amulet Split
InterviewTime limit2sMemory limit1024 MB
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.
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), (, 0), and (0, ). Salamander has a device with a very thin blade that can split the amulet along the vertical line . Find the value of that splits the amulet into two parts of equal area.
Input
A single line contains the numbers and , the coordinates of the amulet's vertices ().
Output
Print a single line with the coordinate where the amulet should be cut. The answer is accepted if its absolute or relative error does not exceed .
Hint
The figure shows the case , . The line splits the amulet into two parts, each with area 3.
