#include using namespace std; typedef long long ll; typedef vector VI; typedef vector VVI; typedef vector VL; typedef vector VVL; typedef pair PII; #define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i) #define REP(i, n) FOR(i, 0, n) #define ALL(x) x.begin(), x.end() #define MOD 1000000007 #define INF (1LL<<25) //33554432 #define PI 3.14159265359 #define EPS 1e-12 //#define int ll signed main(void) { int p, c, a[] = {2, 3, 5, 7, 11, 13}, b[] = {4, 6, 8, 9, 10, 12}; double dp[20][6] = {0}; cin >> p >> c; REP(i, 6) dp[0][i] = 1; FOR(i, 1, p+1) { REP(j, 6) { REP(k, 6) { dp[i][j] += dp[i-1][k] * a[j] / 6; } } } FOR(i, p+1, p+c+1) { REP(j, 6) { REP(k, 6) { dp[i][j] += dp[i-1][k] * b[j] / 6; } } } /*REP(i, c+p+1) { REP(j, 6) { cout << dp[i][j] << " "; } cout << endl; }*/ double ret = 0; REP(i, 6) { //cout << dp[p+c][i] << " "; ret += dp[p+c][i]/6; } //cout << endl; cout << fixed << setprecision(15) << ret << endl; return 0; }