import sys INF = float('inf') #10**20,2**63,float('inf') MOD = 10**9 + 7 MOD2 = 998244353 from collections import defaultdict def solve(): def II(): return int(sys.stdin.readline()) def LI(): return list(map(int, sys.stdin.readline().split())) def LC(): return list(input()) def IC(): return [int(c) for c in input()] def MI(): return map(int, sys.stdin.readline().split()) N = II() M = II() def modinv(x): return pow(x, MOD2 - 2, MOD2) All = pow(2,N,MOD2) Dec = 0 for m in range(M): if(m==0):Dec+=1 elif(m==1): Dec+=N%MOD2 now = N else: now*=(N-(m-1))*modinv(m) now%=MOD2 Dec+=now Dec%=MOD2 print((All-Dec)%MOD2) return solve()