Problem D
Input: standard input
Output: standard output
Time Limit: 2 seconds
Memory Limit: 32 MB
You are
asked to place the largest possible square inside a regular pentagon (whose internal
angles are same and all the sides are same in length). You are given the
information that one vertex of the square will be coincident with a vertex of
the square as shown in the figure below. You will have to find the length of a
side of the square when a side of the regular pentagon is given.
Input
The
input file contains several lines of input. Each line contains a floating point
number F (0<=F<=100000) which
indicates the length of a side of the pentagon. Input is terminated by end of
file.
Output
For each line of input produce one line of output
containing a floating point number with ten digits after the decimal point.
This number indicates the largest possible side of a square that fits in the
pentagon. This output will be judged with a special correction program, so
don’t worry about small precision errors.
Sample
Input
0.0000001
0.0000002
0.0000003
Sample
Output
0.0000001067
0.0000002135
0.0000003202
(World Finals Warm-up Contest,
Problem Setter: Shahriar Manzoor)