#include<bits/stdc++.h>
#include<unordered_set>
#include<unordered_map>
using namespace std;
#define REP(i,m,n) for(int i=(m);i<(n);i++)
#define rep(i,n) REP(i,0,n)
#define pb push_back
#define all(a) a.begin(),a.end()
#define rall(c) (c).rbegin(),(c).rend()
#define mp make_pair
typedef int ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef long double ld;
const ll inf=1e9+7;
const ll mod=998244353;
int main(){
    ll n,x;cin>>n>>x;
    vector<vector<ll> > dp(vector<vector<ll> >(n+1,vector<ll>(1<<9)));
    vector<vector<ll> >dp2(vector<vector<ll> >(n+1,vector<ll>(1<<9)));
    dp2[0][0]=1;
    rep(i,x+1){
        rep(k,1<<9){
            rep(j,n+1){
                dp[j][k]=dp2[j][k];
                dp2[j][k]=0;
            }
        }
        rep(k,1<<9){
            rep(j,n+1){
                dp2[j][k]=(dp2[j][k]+dp[j][k])%mod;
                if(j<n)dp2[j+1][k^i]=(dp2[j+1][k^i]+dp[j][k])%mod;
            }
        }
        rep(j,1<<9){
            REP(k,2,n+1){
                dp2[k][j]=(dp2[k][j]+dp2[k-2][j])%mod;
            }
        }
    }
    rep(j,x+1){
        rep(k,n+1){
            //cout<<k<<' '<<j<<' '<<dp2[k][j]<<endl;
        }
    }
    cout<<dp2[n][x]<<endl;
}
