#include using namespace std; double dp[11][61]; double dp2[11][61]; int main(void) { cin.tie(0); ios::sync_with_stdio(false); dp[0][0] = 1; dp2[0][0] = 1; int n,k; cin >> n; cin >> k; for(int i=0;i=0;j--) { for(int x=1;x<=6;x++) { if(j+x<=6*n) { dp[i+1][j+x] += (dp[i][j]/6); } } } } for(int i=0;i=0;j--) { for(int x=4;x<=6;x++) { if(j+x<=6*n) { dp2[i+1][j+x] += (dp2[i][j]/3); } } } } else { for(int j=10*n;j>=0;j--) { for(int x=1;x<=6;x++) { if(j+x<=6*n) { dp2[i+1][j+x] += (dp2[i][j]/6); } } } } } double res = 0; for(int i=0;i<=6*n;i++) { //cout << i << ' ' << dp[n][i] << '\n'; for(int j=i+1;j<=6*n;j++) { res += (dp[n][i]*dp2[n][j]); } } cout << fixed; cout.precision(6); cout << res << '\n'; return 0; }