#D8174. Tunnel
Tunnel
Tunnel
Problem
There are rectangles on the plane with on the horizontal axis and on the vertical axis. The th rectangle is in height and in width, and the vertices are point , point , and point , Point . You choose positive integers and perform the following operations. (1) In the first operation, draw a line segment connecting the point and the point . (2) In the operation of th time , a line segment connecting the point and the point pull.
For the operation, set as follows. Let A be the endpoint with the smaller coordinates of the line segment drawn in the operation, and B be the endpoint with the larger coordinates. Also, point is C, point is D, point is E, and point is F. To do. Let be the area of the non-intersection between the trapezoid ABFC and the rectangle DEFC. Five examples are shown below. in each example is the total area of the area containing the star mark. Find that minimizes , and output the minimum value of .
Constraints
The input satisfies the following conditions.
Input
The input is given in the following format.
All inputs are given as integers.
Output
Output the minimum value of on one line. However, absolute or relative errors up to are acceptable.
Examples
Input
2 5 3
Output
2.83333333
Input
3 6 1 4
Output
6.25000000
Input
7 3 1 9 2 2 5 1
Output
12.37500000
inputFormat
outputFormat
output the minimum value of .
Constraints
The input satisfies the following conditions.
Input
The input is given in the following format.
All inputs are given as integers.
Output
Output the minimum value of on one line. However, absolute or relative errors up to are acceptable.
Examples
Input
2 5 3
Output
2.83333333
Input
3 6 1 4
Output
6.25000000
Input
7 3 1 9 2 2 5 1
Output
12.37500000
样例
7
3 1 9 2 2 5 1
12.37500000