#include <bits/stdc++.h>
inline int read() {
  int data = 0, w = 1;
  char ch = getchar();
  while (ch != '-' && (ch < '0' || ch > '9')) ch = getchar();
  if (ch == '-') w = -1, ch = getchar();
  while (ch >= '0' && ch <= '9') data = data * 10 + (ch ^ 48), ch = getchar();
  return data * w;
}
const int N(2e6 + 10), Mod(998244353);
int n, m, inv[N], M, ans;
int main() {
  n = read(), m = read(), M = std::max(n, m) + 1, inv[1] = 1;
  for (int i = 2; i <= M; i++)
    inv[i] = (Mod - 1ll * (Mod / i) * inv[Mod % i] % Mod) % Mod;
  for (int i = 1; i <= n; i++) ans = (ans + inv[i]) % Mod;
  ans = 1ll * (1 + 1ll * m * ans) % Mod * inv[m + 1] % Mod * (n + m + 1) % Mod;
  printf("%d\n", ans);
  return 0;
}
