n = int(input()) if n >= 200: exit(print(1)) p = float(input()) print(1 - pow(1 - p, n))