Circles of Hell
Little Mirko hates reading. Yesterday his teacher told him to review an old classic - Dante's 'Inferno'... Poor chap, he couldn't have known what the book would do to him. After reading the book several times, poor Mirko went mad. He decided to open the gates of hell by constructing a device using large circles. Of course, all of this will take place on Mirko's old attic.
His plan goes like this:
He constructs the central circle of radius 1. That circle is numbered 0. Now he starts from the north-east side of that circle and there he puts another one ( also of radius 1 ). When he finishes doing so, he continues building chain, round the chain ( each chain starting from north-east, look at the picture for a better view ).
After he has built N circles, he wishes to know the distance between the center of circle N to the center of circle 0. Due to Mirko's bad skills in math, not only reading, he asked you to make a program to help him with his grim plans.
The picture corresponds to the second test sample.
Sample input:
7 Sample output:
4.00 Sample input:
20 Sample output:
5.29 Submit solution
Coming laterThe grading service will be connected in a later migration step. You can inspect the task and your previous results now.