#include<iostream>
#include<vector>
#include<cstdio>
#include<cmath>
#include<cctype>
#include<climits>
#include<sstream>
#include<algorithm>
using namespace std;
#define REP(i, j) for(int i = 0; i < j; i++)
#define FOR(i, j, k) for(int i = j; i < k; i++)
#define P pair<int, string>
const int INF = INT_MAX / 2;
const long long int N = 11;
const long long int S_MAX = 400;
const long long int P_MAX = (1 << N);

int n, s;

int main(){
    vector< vector< vector<long long int> > > dp(N + 1, vector< vector<long long int> >(S_MAX, vector<long long int>(P_MAX, 0)));
    //int dp[N + 1][S_MAX][P_MAX];
    //初期化
    for(long long int mask = 1, num = 0; mask < (1 << N); mask = (mask << 1), ++num){
        dp[1][num][mask] = 1;
    }

    FOR(i, 2, N + 1){
        for(long long int mask = 1, num = 0; mask < (1 << N); mask = (mask << 1), ++num){
            FOR(j, num * i, S_MAX){
                for(long long int k = 1; k < (1 << N); ++k){
                    if((k & mask) != 0) continue;
                    long long int p = (k | mask);
                    if(j - (num * i) >= 0) dp[i][j][p] += dp[i - 1][j - (num * i)][k];
                }
            }
        }
    }

    while(cin >>n){
        cin >>s;
        long long int ans = 0;
        REP(i, P_MAX){
            ans += dp[n][s][i];
        }
        cout <<ans <<endl;
    }
    return 0;
}