import java.util.Arrays; import java.util.Scanner; public class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { int P = sc.nextInt(); int Q = sc.nextInt(); double[][] dp = new double[2][101]; double ans = 1.0 / 3; dp[0][P] = 1.0 / 3; int t = 0; for (int i = 0; i < 100000; ++i) { Arrays.fill(dp[1 - t], 0); for (int j = 0; j <= 100; ++j) { // use ans += 0.01 * j * dp[t][j] / 2; dp[1 - t][Math.max(0, j - Q)] += 0.01 * j * dp[t][j] / 2; // not use ans += 0.01 * (100 - j) * dp[t][j] / 3; dp[1 - t][Math.min(100, j + Q)] += 0.01 * (100 - j) * dp[t][j] / 3; } t = 1 - t; } System.out.printf("%.9f\n", ans); } }