eolymp
bolt
Try our new interface for solving problems
Problems

Equal balls

Equal balls

\includegraphics{https://static.e-olymp.com/content/6d/6d83547f7ab81b484cf199b5ef0b93e2775bee40.jpg} \textbf{Ship Grove, 1898} \textit{When comparing the color "Ship groves," the late works of Shishkin, with the colors of his earlier works, it is clear that the landscape painter, like his contemporaries, a genre painter, has moved from a local understanding of color to the mean, but the whole color scheme. The basis of this scale is based on transfer unifying image of light and shade.} \textit{In this picture, Shishkin found in the color association grayish-brown trunks of fir trees and green moss in the foreground for a new understanding of tonal colors.} \textit{Painting is also interesting new way to transfer the space of the forest. Trees are portrayed not as a whole, as well as to cut off the frame. Ate are given visible in the vicinity, but when the viewer looks at them, he can not cover the whole picture.} In opaque closed box with a small hole in the top there are $n$ balls ($n$ is even), half of them are black, the others are white. You have a perfect coin that you begin to flip. If you get the head, you pull out of the box the white ball. If tail --- you pull out the black one. When there are only two balls left in the box, there is no sense to flip the coin (till this moment the box contains at least one black and at least one white ball). Give the probability that this situation will happen. \InputFile Each line is a separate test case and contains the number of balls $n~(0 < n \le 10^5, n$ is even) in the box. \OutputFile For each test case in a separate line print the probability that the situation described above will happen. Print the probability with $8$ decimal digits.
Time limit 1 second
Memory limit 128 MiB
Input example #1
6
10
256
Output example #1
0.62500000
0.72656250
0.94998552
Source Medvedev М.G. - Kharkiv Winter School 2009