mod=998244353 def cmb(n,r): if r<0 or r>n: return 0 return ((g1[n]*g2[r]%mod)*g2[n-r])%mod N=1000000 g1=[1]*(N+3) for i in range(2,N+3): g1[i]=g1[i-1]*i%mod g2=[0]*len(g1) g2[-1]=pow(g1[-1],mod-2,mod) for i in range(N+1,-1,-1): g2[i]=g2[i+1]*(i+1)%mod inv=[0]*(N+3) for i in range(1,N+3): inv[i]=g2[i]*g1[i-1]%mod N,K=map(int,input().split()) if K==0: print(1) exit() if K==1: if N&1: print(N-2) else: print(2) exit() if N==K: print(1) exit() if K==2: N>>=1 print(N*N%mod) exit() A,B=0,0 x,y=1,2 for i in range(2,N+1): if i&1: x+=y if x>=mod: x-=mod y+=1 A=(A+x*cmb(N-2-i,K-3))%mod for i in range(3,K+1): A=(A+cmb(N-1-i,K-i))%mod x,y=1,2 N-=2 for i in range(2,N+1): if i&1: x+=y if x>=mod: x-=mod y+=1 B=(B+x*cmb(N-2-i,K-3))%mod for i in range(3,K+1): B=(B+cmb(N-1-i,K-i))%mod print((A+B)%mod)