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 ans += tmp % mod print(ans % mod)