n,p=int(input()),1-float(input()) print(1-p**n if n<200 else 1)