N = int(input()) P = float(input()) print(1-(1.0-P)**N if N < 200 else 1)