#a,b,c,d,e=map(int, input().split()) N=int(input()) R=float(input()) F=10**12;ans=0 for i in range(N): ans+=F F*=(1-R) print(ans/(10**10))