#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<ctime>
#include<vector>
#include<queue>
#include<algorithm>
#include<string>
#include<sstream>
#include<cctype>
#include<cmath>
#include<iomanip>
#include<map>
#include<stack>
#include<set>
#include<functional>
#define in(x) x=read()
#define qr read()
#define int ll
#define mp make_pair
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
namespace fastIO
{
    #define BUF_SIZE 100000
    bool IOerror=0;
    inline char nc()
	{
        static char buf[BUF_SIZE],*p1=buf+BUF_SIZE,*pend=buf+BUF_SIZE;
        if (p1==pend){
            p1=buf; pend=buf+fread(buf,1,BUF_SIZE,stdin);
            if (pend==p1){IOerror=1;return -1;}
        }
        return *p1++;
    }
    inline bool blank(char ch){return ch==' '||ch=='\n'||ch=='\r'||ch=='\t';}
    inline ll read()
	{
        bool sign=0; char ch=nc();ll x=0;
        for (;blank(ch);ch=nc());
        if (IOerror)return 0;
        if (ch=='-')sign=1,ch=nc();
        for (;ch>='0'&&ch<='9';ch=nc())x=x*10+ch-'0';
        if (sign)x=-x;
        return x;
    }
    #undef BUF_SIZE
};
using namespace fastIO;
#define mod 998244353
int fac[1000010],ifac[1000010];
int c(int x,int y){if(x<y)return 0;else return fac[x]*ifac[x-y]%mod*ifac[y]%mod;}
int qpow(int n,int k)
{
	int ans=1;
	while(k)
	{
		if(k&1)ans*=n,ans%=mod;
		n*=n,n%=mod;
		k>>=1;
	}
	return ans;
}
int n,m;
int ff[5010][5010];
int f(int x,int cnt)
{
	int ans=0;
	if(!x)return 1;
	if(x&1)return 0;
	if(!cnt)return 0;
	if(ff[x][cnt]!=-1)return ff[x][cnt];
	for(int i=0;i<=min(x,n);i+=2)
	{
		ans+=c(n,i)*f((x-i)/2,cnt-1),ans%=mod;
	}
	// cout<<x<<','<<cnt<<":"<<ans<<'\n';
	return ff[x][cnt]=ans;
}
signed main()
{
	//freopen(".in","r",stdin);
	//freopen(".out","w",stdout);
	n=qr,m=qr;
	memset(ff,-1,sizeof(ff));
	if(m&1)return cout<<0,0;
	fac[0]=1;
	for(int i=1;i<=n+m;i++)fac[i]=fac[i-1]*i%mod;
	ifac[n+m]=qpow(fac[n+m],mod-2);
	for(int i=n+m-1;i>=0;i--)ifac[i]=ifac[i+1]*(i+1)%mod;
	int cnt=0;
	for(int i=0;i<=30;i++)
	{
		if(m&(1<<i))cnt=i+1;
	}
	cout<<f(m,cnt);
	return 0;
}
#include <iostream>
#include <iomanip>
#include <vector>
#include <cmath>
#include <algorithm>
#include <deque>
#include <set>
#include <limits>
#include <string>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <list>
#include <numeric>
#include <bitset>

using namespace std;
using ll = long long;

#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, a) for (int i = 0; i < (a); ++i)
#define OUT_PREC(a, n) cout << fixed << setprecision(n) << a << endl

// nが一定の時
class CombMod
{
private:
    ll n;
    const ll _MOD = 998244353;
    vector<ll> val;
    vector<ll> inv;

public:
    CombMod(const ll &n0)
    {
        n = n0;
        val.resize(n + 1, 1);
        val[1] = n;
        inv.resize(n + 1, 1);

        // calculate in advance
        for (ll i = 2; i <= n; ++i)
        {
            inv[i] = _MOD - ((inv[_MOD % i] * (ll)(_MOD / i)) % _MOD);
            val[i] = (((val[i - 1] * (n + 1 - i)) % _MOD) * inv[i]) % _MOD;
        }
    }

    ll get(ll k)
    { // mCk
        if (k < 0)
            return 0;
        else
            return val[k];
    }
};

ll solve()
{
    int n, m;
    cin >> n >> m;
    ll MOD = 998244353;
    CombMod cm(n);
    vector<ll> dp(m + 1, 0);
    dp[0] = 1;

    for (int j = 1; j <= (m / 2); ++j)
    {
        for (int k = 0; k <= min(j, n / 2); ++k)
        {
            dp[2 * j] = (dp[2 * j] + ((dp[j - k] * cm.get(2 * k)) % MOD)) % MOD;
        }
    }

    return dp[m];
}

int main()
{
    /* solve */
    cout << solve() << endl;
    // cout << (solve() ? "Yes" : "No") << endl;
    system("pause");
}