Easy

Execution time limit is 1 second

Runtime memory usage limit is 64 megabytes

Roman figure $I$, which stood on the floor of the room in point with coordinates $X_{0},Y_{0},0$ and did not endure a relation to answer of problem of "Roman numerals". It flowed on the floor. Just as a bottom part of the Roman figure was fasted hinge, so it stayed at the place without change, but the top part of the Roman figure found oneself in point with coordinates $X_{1},Y_{1},0$. In the room stood vertical paper picture. You know coordinates of bottom parts $X_{2},Y_{2},0$ and $X_{3},Y_{3},0$ and height of picture $H$.

Find the length "tear up of paper" on the picture.

For input you have 9 numbers $X_{0}$, $Y_{0}$, $X_{1}$, $Y_{1}$, $X_{2}$, $Y_{2}$, $X_{3}$, $Y_{3}$, $H$. All input data is integer numbers, which module not exceeds $10_{9}$.

The program gives you one number. It is value with precision to $0.001$ which you find.

Input #4

Answer #4