import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); if(N>=200){ System.out.println(1); return; } double P = sc.nextDouble(); double ans = 1-P; while(--N>0){ ans *= 1-P; } System.out.println(1-ans); } }