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