N=int(input()) p=float(input()) if N>=200: print(1) else: q=1-p ans=1-q**N print(ans)