#include using namespace std; int64_t p[] = {2, 3, 5, 7, 11, 13}; int64_t c[] = {4, 6, 8, 9, 10, 12}; int P, C; double recursive(int pos, double val) { if(pos >= P + C) { return val; } double a = 0; for(int i = 0; i < 6; i++) { a += recursive(pos + 1, val * (pos < P ? p[i] : c[i]) ); } return a / 6; } int main() { cin >> P >> C; cout << fixed << setprecision(15) << recursive(0, 1) << endl; return 0; }