import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); double p0 = sc.nextInt() / 100.0; double p1 = sc.nextInt() / 100.0; double p2 = sc.nextInt() / 100.0; sc.close(); int n = 80 - a; double[][] dp = new double[n + 1][15]; for (int i = 0; i < 15; i++) { dp[0][i] = i; } for (int year = 1; year <= n; year++) { for (int tooth = 1; tooth < 15; tooth++) { for (int bit = 0; bit < 1 << tooth; bit++) { /* * 1<> t & 1) == 1);// 歯tが抜けていればtrue int count = (t == 0 ? 0 : 1) + (t == tooth - 1 ? 0 : 1); if (count == 0) { // 両隣が抜歯済み p *= injured ? p0 : 1 - p0; } else if (count == 1) { // 片側が抜歯済み p *= injured ? p1 : 1 - p1; } else { // 両隣が生えてる p *= injured ? p2 : 1 - p2; } } double sum = 0; int seq = 0; for (int l = 0; l <= tooth; l++) { if ((bit >> l & 1) == 0 && (l < tooth)) { seq++; } else { sum += dp[year - 1][seq]; seq = 0; } } dp[year][tooth] += p * sum; } } } // System.out.println(Arrays.deepToString(dp)); System.out.println(dp[n][14] * 2); } }