#include <bits/stdc++.h>
using namespace std;
const long long N = 2e6 + 5;
const long long M = 70;
const long long SZ = 450;
const long long mod = 998244353;
const long long inf = 0x3f3f3f3f3f3f3f3f;
long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch > '9' || ch < '0') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
void write(long long x) {
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  if (x >= 10) write(x / 10);
  putchar(x % 10 + '0');
}
long long ksm(long long x, long long y = mod - 2, long long z = mod) {
  long long ret = 1;
  while (y) {
    if (y & 1) ret = (ret * x) % z;
    x = (x * x) % z;
    y >>= 1;
  }
  return ret;
}
long long inv[N], fac[N], ifc[N];
void Init(long long n) {
  inv[1] = 1;
  for (long long i = 2; i <= n; i++)
    inv[i] = inv[mod % i] * (mod - mod / i) % mod;
  fac[0] = 1;
  for (long long i = 1; i <= n; i++) fac[i] = fac[i - 1] * i % mod;
  ifc[0] = 1;
  for (long long i = 1; i <= n; i++) ifc[i] = ifc[i - 1] * inv[i] % mod;
}
long long C(long long n, long long m) {
  if (m < 0 || m > n) return 0;
  return fac[n] * ifc[m] % mod * ifc[n - m] % mod;
}
void add(long long &x, long long y) {
  x += y;
  if (x >= mod) x -= mod;
}
long long n, m, ans;
signed main() {
  Init(N - 1);
  n = read();
  m = read();
  for (long long i = 1; i <= n; i++) add(ans, inv[i]);
  ans = (m * ans + 1) % mod;
  ans = ans * (n + m + 1) % mod * inv[m + 1] % mod;
  cout << ans << endl;
}
