n = int(input()) p = float(input()) if n >= 200: print(1) else: t = (1-p)**n print(1 - t)