#Lutece2841. Moca 酱果然是天才

Moca 酱果然是天才

Migrated from Lutece 2841 Moca 酱果然是天才

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

山吹面包房出新活动啦,预先集齐 nn 点积分的顾客可以获得面包大礼包!

Moca 和 OrangeRain 都想要面包大礼包,他们一开始的积分都是 00,而获得积分的方法有若干种,第 pp 种方法有 12p\frac{1}{2^p} 概率达成,得到 2p12^{p-1} 积分。

Moca 和 OrangeRain 轮流使用方法获得积分,Moca 先做,她想知道自己首先拿到大礼包的概率。因为 Moca 是天才,所以 Moca 可以采取 pp 为任意值的得分方法,并且认为她绝对聪明,而 OrangeRain 只会采取 p=1p=1 的得分方法。

Input

第一行一个数 n (1n500)n\ (1\le n\le 500),意义如题目描述。

Output

输出 Moca 首先拿到大礼包的概率,四舍五入保留 66 位小数。

Samples

1
0.666667

Resources

The 18th UESTC Programming Contest Preliminary