N = gets.to_i P = gets.to_f if N >= 200 puts 1.0 else puts (1.0 - (1.0 - P) ** N).round(12) end