SP2902 CANDY4 - Candy IV

Description

Lazy Child is a lazy child who likes candy very much. Despite being very young, he has two large candy boxes, each initially containing **n** candies. Everyday he picks one box and open it, if there still are candies, he would eat one. If not, he would be quite sad and open the other box. He will pick the first box with probability _p_ and the second box with probability 1-_p_. He might cry if the other box contains few candies. He opens a box and finds it's not empty, then takes out 1 candy from it and eats it for several days, while he can't remember how many days are there exactly. One day, he opens a box, only to find no candy left. Before opening the other box, he wants to know the expected number of candies left in the other box. Can you help him?

Input Format

There are several test cases (about 100), please process till EOF. Each of the following lines contains an integer **n** (1

Output Format

Please print one line per case containing the desired answer. Any answer with an absolute error less than or equal to 10 $ ^{-2} $ would be accepted. Please see the sample output for detailed format.