n,p=int(input()),1-float(input()) print(1-p**n)