p = float(input())

ans = 0
ru_p = 1
for times in range(1, 100000):
    ans += times * (1 - p) * ru_p * p
    ru_p *= p
print(ans)