p = float(input())
ans = 0

i = 1
while p**i > 10**-6:
    ans += p**i
    i += 1

print(ans)