import std.algorithm, std.array, std.container, std.range, std.bitmanip; import std.numeric, std.math, std.bigint, std.random, core.bitop; import std.string, std.regex, std.conv, std.stdio, std.typecons; const auto di1 = [2, 3, 5, 7, 11, 13]; const auto di2 = [4, 6, 8, 9, 10, 12]; void main() { auto rd = readln.split.map!(to!int); auto p = rd[0], c = rd[1]; auto e1 = di1.sum.to!real / 6; auto e2 = di2.sum.to!real / 6; writefln("%.10f", e1 ^^ p * e2 ^^ c); }