N = int(input()) M = int(input()) mod = 998244353 ans = pow(2,N,mod) temp = 1 for i in range(1,M+1): ans = (ans-temp)%mod temp = temp*(M-i)//i print(ans)