#include <iostream>
#include <cstdio>
#define MN 1000000
#define mod 998244353

int fac[MN + 5], inv[MN + 5];

int C(int a, int b) {if(b < 0 || a - b < 0) return 0; return 1ll * fac[a] * inv[b] % mod * inv[a - b] % mod;}

int inc(int a, int b) {return (a += b) >= mod ? a - mod : a;}
int dec(int a, int b) {return (a -= b) < 0 ? a + mod : a;}

int Catalan(int x, int y, int b)
{
	int dx = y - b, dy = x + b;
	return dec(C(x + y, x), C(dx + dy, dx));
}

int main()
{
	fac[0] = inv[0] = inv[1] = 1;
	for(int i = 1; i <= MN; i++) fac[i] = 1ll * fac[i - 1] * i % mod;
	for(int i = 2; i <= MN; i++) inv[i] = 1ll * (mod - mod / i) * inv[mod % i] % mod;
	for(int i = 1; i <= MN; i++) inv[i] = 1ll * inv[i - 1] * inv[i] % mod;
	int n, k; scanf("%d%d", &k, &n);
	int b = 0, ans = 0;
	for(int i = std::max(k, (n + 1) / 2); i <= n; i++)
	{
		int j = n - i;
		if(i == j) j--;
		while(b <= j && (i - j) + (j - b) >= k) b++;
		ans = inc(ans, Catalan(i, j, b));
	}
	printf("%d\n", ans);
}