p = float(input()) ans = 0 now = 1 for i in range(100000): ans += i * now * (1 - p) now *= p print(ans)