#include const int Mod = 998244353; long long fact[200005], fact_inv[200005]; long long div_mod(long long x, long long y, long long z) { if (x % y == 0) return x / y; else return (div_mod((1 + x / y) * y - x, (z % y), y) * z + x) / y; } long long combination(int n, int k) { if (k < 0 || n < k) return 0; return fact[n] * fact_inv[k] % Mod * fact_inv[n-k] % Mod; } int main() { int N, K; scanf("%d %d", &N, &K); if (N == 1) { switch (K) { case 1: printf("1\n"); break; case 2: printf("3\n"); break; case 3: printf("3\n"); break; case 4: printf("3\n"); break; case 5: printf("1\n"); break; case 6: printf("1\n"); break; } return 0; } int i; for (i = 1, fact[0] = 1; i <= N * 2 + 4; i++) fact[i] = fact[i-1] * i % Mod; for (i = N * 2 + 3, fact_inv[N*2+4] = div_mod(1, fact[N*2+4], Mod); i >= 0; i--) fact_inv[i] = fact_inv[i+1] * (i + 1) % Mod; long long ans[4] = {combination(N * 2 + 4, K)}; if (N % 2 == 0) { ans[1] = (K % 2 == 0)? combination(N + 2, K / 2): 0; ans[2] = (K % 2 == 0)? combination(N + 2, K / 2): 0; ans[3] = (K % 4 == 0)? combination(N / 2 + 1, K / 4): 0; } else { ans[1] = (K % 2 == 0)? combination(N + 2 - 1, K / 2): combination(N + 2 - 1, K / 2) * 2; ans[2] = (K % 2 == 0)? combination(N + 2, K / 2): 0; ans[3] = ((K % 4 == 0)? combination(N / 2 + 1, K / 4): 0) + ((K % 4 == 2)? combination(N / 2 + 1, K / 4): 0); } ans[0] += Mod * 2 - (ans[1] + ans[2] - ans[3]); ans[1] += Mod - ans[3]; ans[2] += Mod - ans[3]; printf("%lld\n", (div_mod(ans[0] % Mod, 4, Mod) + div_mod(ans[1] % Mod, 2, Mod) + div_mod(ans[2] % Mod, 2, Mod) + ans[3]) % Mod); fflush(stdout); return 0; }