import java.util.Arrays; import java.util.Scanner; public class Main_yukicoder144 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); double p = sc.nextDouble(); double[] dp = new double[n]; Arrays.fill(dp, 1.0); double ret = 0; for (int i = 2; i <= n; i++) { for (int j = 2; i * j <= n; j++) { dp[i * j - 1] *= (1.0 - p); } ret += dp[i - 1]; } System.out.printf("%.7f\n", ret); sc.close(); } }