#include<iostream>
#include<algorithm>
#include<cstring>
#define debug(a) cout<<#a<<" = "<<a<<endl

using namespace std;

typedef long long ll;
const int N = 5010;
const int MOD = 998244353;

int n , m;
ll C[N];
ll f[N];

ll Q_power(ll a ,ll b){
    ll res = 1;
    while(b){
        if(b & 1) res = res * a % MOD;
        b >>= 1;
        a = a*a % MOD;
    }
    return res;
}

ll X_1(ll a){ return Q_power(a ,MOD - 2) ;}

void init(){
    C[0] = 1;
    for(int i = 1 ; i <= n ; i ++){
        C[i] = C[i - 1] * (n - i + 1) % MOD * X_1(i) % MOD;
    }
}

ll F(int m){
    if(~f[m] == 0){
        f[m] = 0;
        if(!(m & 1)){
            for(int i = 0 ; i * 2 <= m ; i ++){
                f[m] = (f[m] + C[i * 2] * F(m / 2 - i) % MOD) % MOD; 
            }
        }
    }
    return f[m];
}

int main(){
    cin >> n >> m;
    memset(f,0xff,sizeof f);
    init(); f[0] = 1;
    cout << F(m) << endl;
    return 0;
}

#include<cstdio>
#include<iostream>
#include<cstring>
#include<vector>
#include<algorithm>
#include<set>
typedef long long ll;
typedef unsigned un;
typedef std::vector<int> P;
typedef std::pair<int,int> pii;
ll read(){ll x=0,f=1;char c=getchar();while(c<'0'||c>'9'){if(c=='-')f=-1;c=getchar();}while(c>='0'&&c<='9')x=x*10+(c-'0'),c=getchar();return f*x;}
ll max(ll a,ll b){return a>b?a:b;}
ll min(ll a,ll b){return a<b?a:b;}
template <typename T> bool umax(T& a,T t){if(t>a)return a=t,1;return 0;}
template <typename T> bool umin(T& a,T t){if(t<a)return a=t,1;return 0;}
/**********/
const int MAXN = 5011,mod = 998244353;
int C[MAXN][MAXN];
int f[MAXN],pre[MAXN];
void init(int n)
{
	C[0][0]=1;
	for(int i=1;i<=n;++i)
	{
		C[i][0]=1;
		for(int j=1;j<=i;++j)C[i][j]=(C[i-1][j-1]+C[i-1][j])%mod;
	}
}
int main()
{
	init(5000);
	int n=read(),m=read(),rest=m;
	f[0]=1;
	for(int i=0;(1<<i)<=m;++i)
	{
		memcpy(pre,f,sizeof f),memset(f,0,sizeof f);
		for(int j=0;j<=rest;++j)
			for(int k=0;k*(1<<i)<=j;k+=2)f[j]=(f[j]+ll(pre[j-k*(1<<i)])*C[n][k])%mod;

	}
	printf("%d\n",f[m]);
	return 0;
}
