#include <iostream>

namespace wxy{
    const int mod = 998244353;
    int f[15][5050],fac[5050],invfac[5050];
    inline void init(){
        fac[0]=invfac[0]=invfac[1]=1;
        for(int i=1;i<=5000;i++)fac[i]=(long long)fac[i-1]*i%mod;
        for(int i=2;i<=5000;i++)invfac[i]=(long long)(mod-mod/i)*invfac[mod%i]%mod;
        for(int i=2;i<=5000;i++)invfac[i]=(long long)invfac[i-1]*invfac[i]%mod;
    }
    inline int C(int n,int m){return n<m?0:(long long)fac[n]*invfac[m]%mod*invfac[n-m]%mod;}
    inline void main(){
        int n,m; std::cin >> n >> m; init();
        if (m % 2 == 1) {std::cout << 0; return;}
        int limit = 1,t = 0;
        while (limit < m) {limit <<= 1; t++;}
        for (int k = 0; 2 * k <= n; k++) f[0][2 * k] = C(n,2 * k);
        int ans = 0;
        for (int i = 1; i <= t; i++){
            f[i][0] = 1;
            for(int j = 1; j <= m; j++){
                if (j % 2 == 1) continue;
                for (int k = 0; 2 * k <= n && j - (2 * k) * (1 << i) >= 0; k++)
                    f[i][j] = (f[i][j] + 1ll * C(n,2 * k) * f[i - 1][j - (2 * k) * (1 << i)] % mod) % mod;
            }
        }
        std::cout << f[t][m];
    }
}signed main(){wxy::main(); return 0;}
#include <bits/stdc++.h>
#define lc (o<<1)
#define rc ((o<<1)|1)
#define PB push_back
#define MK make_pair
using namespace std;
#define DebugP(x) cout << "Line" << __LINE__ << " " << #x << "=" << x << endl

const int maxn = 5000 + 5;
const int modu = 998244353; // 1e9 + 7
const int inf = 0x3f3f3f3f;
const double eps = 1e-5;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};

typedef long long LL;

void read(LL &x)
{
    x=0;int f=0;char ch=getchar();
    while(ch<'0'||ch>'9')  {f|=(ch=='-');ch=getchar();}
    while(ch>='0'&&ch<='9'){x=(x<<1)+(x<<3)+(ch^48);ch=getchar();}
    x=f?-x:x;
    return;
}

void read(int &x) { LL y; read(y); x = (int)y; }
void read(char &ch) { char s[3]; scanf("%s", s); ch = s[0]; }
void read(char *s) { scanf("%s", s); }
template<class T, class ...U> void read(T &x, U& ... u) { read(x); read(u...); }

int n, m;
int a[maxn];
LL inv[maxn], c[maxn], f[20][maxn];
int b[20];

int main() {
    // freopen("my.txt", "w", stdout);
    read(n, m);
    inv[1] = 1;
    for (int i = 2; i <= n; ++i)
        inv[i] = (modu - (modu/i))*inv[modu%i]%modu;
    c[0] = 1;
    for (int i = 1; i <= n; ++i)
        c[i] = (n-i+1)*inv[i]%modu*c[i-1]%modu;
    int nb = 0;
    while (m) {
        b[nb++] = m%2;
        m /= 2;
    }
    memset(f, 0, sizeof(f));
    f[nb-1][0] = 1;
    int tot = b[nb-1];
    for (int i = nb-2; i >= 0; --i) {
        for (int j = 0; j <= tot*2 + b[i]; ++j) if (j%2 == 0) {
            for (int k = 0; k <= j && k <= n; k += 2)
                f[i][j] = (f[i][j] + f[i+1][(j-k)/2]*c[k]) % modu;
        }
        tot = tot*2 + b[i];
    }
    printf("%lld\n", f[0][tot]);
	return 0;
}