import java.util.*; public class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); double p = sc.nextDouble(); double[] primes = new double[n + 1]; Arrays.fill(primes, 1.0); double ans = 0; for (int i = 2; i <= n; i++) { ans += primes[i]; for (int j = 2; j * i <= n; j++) { primes[i * j] *= (1 - p); } } System.out.print(ans); } }