提示: 欢迎访问OurACM平台。
Problem 1378 Win the prize

Accept: 342    Submit: 733
Time Limit: 1000 mSec    Memory Limit : 32768 KB

Problem Description

There are various lottery tickets selling on the streets. When you buy the ticket and uncover the sealed tinfoil, you can see a beautiful picture on the ticket. There are totally n kinds of pictures. If you collect all these kinds of pictures, you can win the big prize. Now the problem is how many tickets are needed to win the big prize in average.

Input

There are mutiple test cases. Each case has only one line containing a integer n(0<=n<=10^6), indicates the number of different pictures.

A case with a negative integer marks the end of input. This case should not be processed.

Output

For each test case, print on a single line the average number of tickets needed to win the big prize (accurate to three fractional digits).

Sample Input

1 2 -1

Sample Output

1.000 3.000

Source

FZU 2005

Submit  Back  Status  Discuss