#include #include using namespace std; using ll = long long; #define REP(i,n) for(int i=0;i void chmin(T& a, T b) { a = min(a, b); } template void chmax(T& a, T b) { a = max(a, b); } #define PR(x) cerr << #x << "=" << x << endl using i128 = __int128_t; struct nCkmod { vector fanc; vector fancinv; long long mod; nCkmod(long long n, long long mod_ = 998244353): fanc(n + 1), fancinv(n + 1), mod(mod_) { fanc[0] = 1; fancinv[0] = 1; for(long long i = 1; i <= n; i++) { fanc[i] = (fanc[i - 1] * i) % mod; fancinv[i] = (fancinv[i - 1] * modinv(i)) % mod; } } long long modinv(long long a) { long long b = mod, u = 1, v = 0; while (b) { long long t = a / b; a -= t * b; swap(a, b); u -= t * v; swap(u, v); } u %= mod; if (u < 0) u += mod; return u; } long long nck(int n, int k) { if(n < k) return 0; return fanc[n] * fancinv[k] % mod * fancinv[n - k] % mod; } }; int main() { ll n, k; cin >> n >> k; if(n == 1) { int ans[7] = {0, 1, 3, 3, 3, 1, 1}; cout << ans[k]; return 0; } nCkmod nck(2 * n + 10); mint ans = nck.nck(2 * n + 4, k); if(k % 2 == 0) { ans += nck.nck(n + 2, k / 2); if(n % 2 == 0) { ans += nck.nck(n + 2, k / 2); } else { ans += nck.nck(n+1, k / 2); ans += nck.nck(n+1, k / 2 - 1); } ans += nck.nck(n + 2, k / 2); } else { if(n % 2 == 0) { } else { ans += 2 * nck.nck(n+1, k / 2); } } ans /= 4; cout << ans.val(); return 0; }