#include <stdio.h>

const int Mod = 998244353;
long long memo[4001][4001] = {};

long long recursion(int x, int y)
{
	if (memo[x][y] != 0) return memo[x][y];
	else memo[x][y] = 0;
	if (x > 0) memo[x][y] += recursion(x - 1, y);
	if (y > 0) memo[x][y] += recursion(x, y - 1);
	if (x > 0 && y > 0) memo[x][y] += recursion(x - 1, y - 1) * 2;
	memo[x][y] %= Mod;
	return memo[x][y];
}

int main()
{
	int x, y;
	scanf("%d %d", &x, &y);
	memo[0][0] = 1;
	
	int i;
	long long ans = 0;
	for (i = 0; i <= x && i <= y; i++) ans += recursion(x - i, y - i);
	printf("%lld\n", ans % Mod);
	fflush(stdout);
	return 0;
}