N,K = map(int, input().split()) mod = 998244353 #コンビネーション def cmb(n, r, mod): if ( r<0 or r>n ): return 0 r = min(r, n-r) return g1[n] * g2[r] * g2[n-r] % mod g1 = [1, 1] # 元テーブル g2 = [1, 1] #逆元テーブル inverse = [0, 1] #逆元テーブル計算用テーブル for i in range( 2, N + 1 ): g1.append( ( g1[-1] * i ) % mod ) inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod ) g2.append( (g2[-1] * inverse[-1]) % mod ) if K==0: print(1) exit() if K==1 and N%2==0: print(2) exit() if K==1 and N%2==1: print(N-2) exit() ans = 0 temp = ((N-K)//2)*2+1 for i in range(0,temp,2): ans = (ans + (i+1)*cmb(N-2-i,K-2,mod))%mod print(ans)