#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 (int i = (int)a; i < (int)n; ++i) #define REP(i, n) FOR(i, 0, n) #define ALL(x) x.begin(), x.end() #define MOD 1000000007 #define INF 1000000000 #define PI 3.14159265359 #define EPS 1e-12 double dp1[11][65], dp2[11][65]; int main(void) { int n, k; cin >> n >> k; dp1[0][0] = dp2[0][0] = 1.0; for(int i=1; i<=k; ++i) { for(int j=6*i; j>=0; --j) { for(int k=4; k<=6; ++k) { if(j >= k) dp1[i][j] += dp1[i-1][j-k] / 3; } } } for(int i=k+1; i<=n; ++i) { for(int j=6*i; j>=0; --j) { for(int k=1; k<=6; k++) { if(j >= k) dp1[i][j] += dp1[i-1][j-k] / 6; } } } for(int i=1; i<=n; ++i) { for(int j=6*i; j>=0; --j) { for(int k=1; k<=6; ++k) { if(j >= k) dp2[i][j] += dp2[i-1][j-k] / 6; } } } //for(int i=1; i<=12; ++i) cout << dp1[i] << " "; cout << endl; //for(int i=1; i<=12; ++i) cout << dp2[i] << " "; cout << endl; double ans = 0.0; for(int i=1; i<=n*6; ++i) { for(int j=0; j < i; ++j) { ans += dp1[n][i] * dp2[n][j]; } } cout << fixed << setprecision(9) << ans << endl; return 0; }