#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[5] = {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 % 2 == 0)? combination(N + 2, K / 2): 0; ans[4] = (K % 4 == 0)? combination(N / 2 + 1, K / 4): 0; } else { ans[1] = (K % 2 == 0)? combination(N + 1, K / 2) + combination(N + 1, K / 2 - 1): combination(N + 1, K / 2) * 2; ans[2] = (K % 2 == 0)? combination(N + 2, K / 2): 0; ans[3] = (K % 2 == 0)? combination(N + 2, K / 2): 0; ans[4] = (K % 2 == 0)? combination(N / 2 + 1, K / 4): 0; } ans[0] -= ans[1] + ans[2] + ans[3] - ans[4] * 2; ans[1] -= ans[4]; ans[2] -= ans[4]; ans[3] -= ans[4]; for (i = 0; i < 4; i++) { while (ans[i] >= Mod) ans[i] -= Mod; while (ans[i] < 0) ans[i] += Mod; } printf("%lld\n", (div_mod(ans[0], 4, Mod) + div_mod((ans[1] + ans[2] + ans[3]) % Mod, 2, Mod) + ans[4]) % Mod); fflush(stdout); return 0; }