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