#include using namespace std; #include using namespace atcoder; using mint=modint998244353; int main(void) { int n,k; cin >> n >> k; vector inv(2*n+5,1); vector fact(2*n+5,1); vector finv(2*n+5,1); for(int i=2;i<=2*n+4;++i){ inv[i]=mint(i).inv(); fact[i]=fact[i-1]*i; finv[i]=finv[i-1]*inv[i]; } if(n==1){ if(k==2 || k==3 || k==4){ cout << 3 << endl; } else { cout << 1 << endl; } return 0; } mint ans=fact[2*n+4]*finv[k]*finv[2*n+4-k]; if(n%2==0){ if(k%2==0){ ans+=fact[n+2]*finv[k/2]*finv[n+2-k/2]*3; } } else { if(k%2==0){ ans+=fact[n+2]*finv[k/2]*finv[n+2-k/2]*2; ans+=fact[n+1]*finv[k/2]*finv[n+1-k/2]; ans+=fact[n+1]*finv[(k-2)/2]*finv[n+1-(k-2)/2]; } else { ans+=fact[n+1]*finv[(k-1)/2]*finv[n+1-(k-1)/2]*2; } } ans/=4; cout << ans.val() << endl; return 0; }