#include #include #include using ldouble = long double; ldouble exp(const std::vector& dice, int turn) { if (turn == 0) return 1; ldouble ret = 0; for (auto x : dice) { ret += x * exp(dice, turn - 1) / 6; } return ret; } void solve() { int p, c; std::cin >> p >> c; auto ans = exp({2, 3, 5, 7, 11, 13}, p) * exp({4, 6, 8, 9, 10, 12}, c); std::cout << std::fixed << std::setprecision(10) << ans << std::endl; } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); solve(); return 0; }