p=float(input()) t=1-p ans=t for i in range(2,10000): t*=p ans+=t*i print(ans-1)