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 = P; while(--N>0){ ans *= P; } System.out.println(1-ans); } }