SIZE=10**6+1 MOD = 998244353 #inv = [0]*SIZE # inv[j] = j^{-1} mod MOD fac = [0]*SIZE # fac[j] = j! mod MOD finv = [0]*SIZE # finv[j] = (j!)^{-1} mod MOD fac[0] = fac[1] = 1 finv[0] = finv[1] = 1 for i in range(2,SIZE): fac[i] = fac[i-1]*i%MOD finv[-1] = pow(fac[-1],MOD-2,MOD) for i in range(SIZE-1,0,-1): finv[i-1] = finv[i]*i%MOD #inv[i] = finv[i]*fac[i-1]%MOD def choose(n,r): # nCk mod MOD の計算 if 0 <= r <= n: return (fac[n]*finv[r]%MOD)*finv[n-r]%MOD else: return 0 import sys readline = sys.stdin.readline n,k = map(int,readline().split()) g = [pow(i,n,MOD)*choose(k,i)%MOD for i in range(k+1)] g = g[::-1] ans = 0 r = 1 for i in range(1,k+1): ans += g[i]*r ans %= MOD r = r*(-2)%MOD print(ans)