p = float(input()) ans = 0 tmp = 1 for i in range(10**2): tmp *= p ans += tmp * (1-p) print(ans)