import sys input = sys.stdin.readline mod=998244353 FACT=[1] for i in range(1,3*10**5+1): FACT.append(FACT[-1]*i%mod) FACT_INV=[pow(FACT[-1],mod-2,mod)] for i in range(3*10**5,0,-1): FACT_INV.append(FACT_INV[-1]*i%mod) FACT_INV.reverse() def Combi(a,b): if 0<=b<=a: return FACT[a]*FACT_INV[b]%mod*FACT_INV[a-b]%mod else: return 0 N,M=map(int,input().split()) ANS=0 if N==M==1: print(1) exit() """ for x in range(1,M): for j in range(N+1): ANS+=Combi(x,j)*Combi(x,N-1-j) #print(ANS) print(ANS%mod) """ F2=[1,1] for i in range(2,6*10**5+1): F2.append(F2[-2]*i%mod) def calc(x,y): if y==x*2+1: return 1 if x-y//2>=0: A1=FACT[x]*pow(FACT[x-y//2],mod-2,mod) else: A1=0 if 2*x-1-(y-1)//2*2>=0: A2=F2[2*x-1]*pow(F2[2*x-1-(y-1)//2*2],mod-2,mod) else: A2=0 C1=FACT[(y-1)//2] C2=F2[y//2*2-1] #print(A1,A2,C1,C2) if y%2==0: A1*=2 return A1*A2*pow(C1*C2,mod-2,mod)%mod for x in range(1,M): ANS+=calc(x,N) #if calc(x,N)>0: # print(x,calc(x,N)) #X=0 #for j in range(N+1): # X+=Combi(x,j)*Combi(x,N-1-j) #print((x,N),calc(x,N),X) print(ANS%mod)