import std.stdio, std.array, std.string, std.conv, std.algorithm; import std.typecons, std.range, std.random, std.math, std.container; import std.numeric, std.bigint, core.bitop; void main() { immutable int T = 14; auto N = readln.chomp.to!int; auto P = readln.split.map!(a => a.to!int / 100.0L).array; auto trans = new real[int][](1<= 0; --m2) { m2 &= m1; real tmp = 1; for (int i = 0; i < T; ++i) { if ((1 << i) & m1) { bool l = (i != 0) && ((1 << (i-1)) & m1); bool r = (i != T-1) && ((1 << (i+1)) & m1); real safe; if (l && r) safe = 1 - P[2]; else if (l || r) safe = 1 - P[1]; else safe = 1 - P[0]; tmp *= ((1 << i) & m2) ? safe : 1 - safe; } } trans[m1][m2] = tmp; } } auto dp = new real[][](80-N+1, 1<