// Artur Kraska, II UWr

#include <bits/stdc++.h>

#define forr(i, n)                  for(int i=0; i<n; i++)
#define FOREACH(iter, coll)         for(auto iter = coll.begin(); iter != coll.end(); ++iter)
#define FOREACHR(iter, coll)        for(auto iter = coll.rbegin(); iter != coll.rend(); ++iter)
#define lbound(P,R,PRED)            ({typeof(P) X=P,RRR=(R), PPP = P; while(PPP<RRR) {X = (PPP+(RRR-PPP)/2); if(PRED) RRR = X; else PPP = X+1;} PPP;})
#define testy()                     int _tests; scanf("%d", &_tests); FOR(_test, 1, _tests)
#define CLEAR(tab)                  memset(tab, 0, sizeof(tab))
#define CONTAIN(el, coll)           (coll.find(el) != coll.end())
#define FOR(i, a, b)                for(int i=a; i<=b; i++)
#define FORD(i, a, b)               for(int i=a; i>=b; i--)
#define MP                          make_pair
#define PB                          push_back
#define ff                          first
#define ss                          second
#define deb(X)                      X;

#define M 998244353
#define INF 1000000007LL

using namespace std;

int n, m, a;
long long tr[5005][5005];
long long res;
map <pair<int, long long>, long long> mapa;

long long gen(int nr, int zostalo)
{
    if(CONTAIN(MP(nr, zostalo), mapa))
        return mapa[MP(nr, zostalo)];
    long long res = 0;
//    cout << "na " << nr << " zostalo " << zostalo << ", r: " << r << endl;
    if(zostalo == 0)
    {
        return 1;
    }
    if(zostalo < (2<<nr))
        return 0;
    for(int i=0; (i<<nr)<= zostalo && i <= n; i+=2)
    {
        res = (res + tr[n][i]*gen(nr+1, zostalo - (i<<nr))%M) % M;
    }
    mapa[MP(nr, zostalo)] = res;
    return res;
}

int solve()
{
    scanf("%d %d", &n, &m);

    tr[0][0] = 1;
    FOR(i, 1, n)
    {
        tr[i][0] = 1;
        FOR(j, 1, n)
        {
            tr[i][j] = (tr[i-1][j-1] + tr[i-1][j]) % M;
        }
    }

    printf("%lld\n", gen(0, m));

    return 0;
}

int main()
{
    solve();

    return 0;
}

#include <algorithm>
#include <iostream>
#include <iomanip>
#include <numeric>
#include <cassert>
#include <vector>
#include <random>
#include <cmath>
#include <stack>
#include <queue>
#include <set>
#include <map>

//#include <atcoder/all>

#define syosu(x) fixed<<setprecision(x)
using namespace std;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef pair<int,int> P;
typedef pair<double,double> pdd;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<string> vs;
typedef vector<P> vp;
typedef vector<vp> vvp;
typedef vector<pll> vpll;
typedef pair<int,P> pip;
typedef vector<pip> vip;
const int inf=1<<30;
const ll INF=1ll<<60;
const double pi=acos(-1);
const double eps=1e-8;
const ll mod=998244353;
const int dx[8]={-1,0,1,0,1,1,-1,-1},dy[8]={0,1,0,-1,1,-1,1,-1};

//using namespace atcoder;

ll Pow(ll n,ll p){
	ll r=1;
	for(;p>0;p>>=1){
		if(p&1) r=(r*n)%mod;
		n=(n*n)%mod;
	}
	return r;
}

const int M=1000005;
ll F[M];

void Init(){
	F[0]=1;
	for(int i=1;i<M;i++) F[i]=F[i-1]*i%mod;
}

ll Div(ll n,ll m){
	return n*Pow(m,mod-2)%mod;
}

ll nCk(ll n,ll k){
	return Div(F[n],F[n-k]*F[k]%mod);
}

ll dp[21][5005],N;

ll Rec(int i,int n){
	if(n==0) return 1;
	if(i<0) return 0;
	if(dp[i][n]>=0) return dp[i][n];
	ll res=0,x=1<<i;
	for(int j=0;j*x<=n&&j<=N;j+=2){
		(res+=nCk(N,j)*Rec(i-1,n-j*x))%=mod;
	}
	return dp[i][n]=res;
}

int m;

int main(){
	for(int i=0;i<21;i++) for(int j=0;j<5005;j++) dp[i][j]=-1;
	Init();
	cin>>N>>m;
	cout<<Rec(20,m)<<endl;
}










