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