Author: | G. Grenkin | Time limit: | 1 sec | |
Input file: | input.txt | Memory limit: | 256 Mb | |
Output file: | output.txt |
Mathematicians from the Institute of New Year Research developed a mathematical model of the New Year fir-tree. In this model the fir is supposed to be a sphere with a radius of 1 meter. Modeling of a fir garland is, however, more complicated.
A fir garland is modeled with a curve located on the sphere. The curve begins at the topmost point of the sphere, ends at the bottommost point of the sphere, and makes exactly N turns around it.
Consider spherical coordinates φ (longitude) and θ (latitude). The initial value of longitude equals 0, longitude makes exactly N turns and the final value equals 0 again. The initial value of latitude equals 90°, the final value equals -90°. The increment of latitude is proportional to the increment of longitude.
Your program must, for a given value of N, calculate the length of the curve which models a fir garland.
Input file contains a single integer N.
Output file must contain a single real number — the length of the curve (in meters) with at least 3 correct digits after decimal point.
1 \le N \le 100
No. | Input file (input.txt ) |
Output file (output.txt ) |
---|---|---|
1 |
|
|
2 |
|
|