MOD = 998244353 N = 200000 fact = [0 for _ in range(N)] invfact = [0 for _ in range(N)] fact[0] = 1 for i in range(1, N): fact[i] = fact[i - 1] * i % MOD invfact[N - 1] = pow(fact[N - 1], MOD - 2, MOD) for i in range(N - 2, -1, -1): invfact[i] = invfact[i + 1] * (i + 1) % MOD def nCk(n, k): if k < 0 or n < k: return 0 else: return (fact[n] * invfact[k] % MOD) * invfact[n - k] % MOD def nPk(n, k): if k < 0 or n < k: return 0 else: return fact[n] * invfact[n - k] % MOD def nHk(n, k): if n == k == 0: return 1 return nCk(n + k - 1, k) x, y = map(int, input().split()) if y >= 5000: exit() bi = [1] for _ in range(min(x, y) + 1): bi.append(bi[-1] * 2 % MOD) ans = 0 for i in range(min(x, y) + 1): xx = x - i yy = y - i for cc in range(i + 1): tot = bi[cc] times = nCk(xx + yy + cc, cc) * nCk(xx + yy, xx) % MOD ans += tot * times % MOD ans %= MOD print(ans)