#include <bits/stdc++.h>
using namespace std;
#define int int64_t
#define rep(i, a, b) for(int i = a; i < b; ++i)

int debug = 1;

const int N = 5100, mod = 998244353;

int n, m, a[N], dp[20][N], C[N][N];

void calc_c() {
    rep(i, 0, n + 1) {
        rep(j, 0, i + 1) {
            if (j == 0) C[i][j] = 1;
            else {
                C[i][j] = (C[i - 1][j - 1] + C[i - 1][j]) % mod;
            }
        }
    }
}

int getC(int n, int k) {
    return (k > n || k < 0) ? 0 : C[n][k];
}

main() {
    cin >> n >> m;
    calc_c();
    rep(j, 0, m + 1) {
        if (j % 2 == 0) {
            dp[0][j] = getC(n, j);   
        }
    }
    rep(b, 1, 13) {
        rep(j, 0, m + 1) {
            if (j == 0) {
                dp[b][0] = dp[b - 1][0];
                continue;
            }
            for (int c = 0; c * (1 << b) <= j; c += 2) {
                dp[b][j] += getC(n, c) * dp[b - 1][j - c * (1 << b)] % mod;
                dp[b][j] %= mod;
            }
        }
    }
    cout << dp[12][m] % mod << '\n';
}
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma")
#pragma GCC optimize("unroll-loops")
#include<bits/stdc++.h>
#define N 20005
using namespace std;
const int inf=0x3f3f3f3f,mod=998244353;
inline int read() {
	int s=0,f=0;
	char ch=getchar();
	while(ch<48||ch>57)f=(ch=='-'),ch=getchar();
	while(ch>47&&ch<58)s=(s<<1)+(s<<3)+(ch^48),ch=getchar();
	return f?-s:s;
}
int n,m,ans,mx,fac[N],inv[N],f[20][N];
int Ksm(int a,int n,int ans=1) {
	for(; n; n>>=1,a=1ll*a*a%mod)if(n&1)ans=1ll*ans*a%mod;
	return ans;
}
int C(int n,int m) {
	if(n<m)return 0;
	return 1ll*fac[n]*inv[m]%mod*inv[n-m]%mod;
}
int Mod(int x) {
	return x<mod?x:x-mod;
}
void Add(int &x,int y) {
	x=Mod(x+y);
}
signed main() {
	n=read(),m=read(),fac[0]=1;
	if(m&1)return puts("0"),0;
	for(int i=1; i<=n; ++i)fac[i]=1ll*fac[i-1]*i%mod;
	inv[n]=Ksm(fac[n],mod-2);
	for(int i=n-1; ~i; --i)inv[i]=inv[i+1]*(i+1ll)%mod;
	for(int k=0; k<=n; k+=2)f[0][k>>1]=C(n,k);
	for(int i=0; (1<<i)<m; ++i) {
		if(mx=i+1,(m>>i+1)&1) {
			for(int j=1; j<=10000; j+=2)
				if(f[i][j])for(int k=0; k<=n; k+=2)Add(f[i+1][k+j>>1],1ll*f[i][j]*C(n,k)%mod);
		} else {
			for(int j=0; j<=10000; j+=2)
				if(f[i][j])for(int k=0; k<=n; k+=2)Add(f[i+1][k+j>>1],1ll*f[i][j]*C(n,k)%mod);
		}
	}
	cout<<f[mx][0];
	return 0;
}