#include using namespace std; int main() { int P, C; cin >> P >> C; int A[2][6]{{2, 3, 5, 7, 11, 13}, {4, 6, 8, 9, 10, 12}}; vector now(1, 1); for (int _ = 0; _ < P + C; _++) { vector nxt; for (auto& x : now) for (int i = 0; i < 6; i++) nxt.emplace_back(x * A[_ >= P][i]); swap(now, nxt); } double ans = 0; for (auto& x : now) ans += 1.0 * x / now.size(); cout << fixed << setprecision(10) << ans << endl; }