mod = 998244353 N = int(input()) M = int(input()) ans = 0 tmp = 1 for i in range(N, M-1, -1): tmp *= i tmp //= N - i + 1 tmp %= mod ans += tmp if ans > mod:ans -= mod print(ans % mod)