Module: Greedy Algorithms


Problem

4 /9


Walk in the fishing competition

Problem

Today Pesci is participating in a fishing competition with rather interesting rules.
Fishing takes place in several rounds. Anyone who does not manage to catch enough fish in the allotted time is out. The rest go to the next round. The game continues until there is only one player left.
After each round that Pesci successfully completes, if he had s opponents left at the beginning of this round and t of them were eliminated in the same round, then Pesci gets \({t \over s}\) dollars. Accordingly, in the next round he will already have s - t opponents.
Pesci wondered what the biggest prize he could get at best was. However, the competition starts soon enough that he doesn't have time to count. Maybe you can?

Input:
The only line contains an integer n (1 ≤ n ≤ 105) representing the number of Pesci's opponents.

Output:
Print the largest possible prize (in dollars) that Pesci can get.
Your answer will be counted if its absolute or relative error is no more than 10−4. In other words, if your answer is a and the jury's answer is b, then \({|a - b| \over max(1,b)} \le 10^{ -4}\)  .

Examples:
 
Input Output
1 1.000000000000
2 1.500000000000