p = float(input())
ans = 0
i = 1
while True:
    temp = p**i*(1-p)*i
    ans += temp
    if temp<10**(-6):
        break
    i+=1
print(ans)