H,W=map(int,input().split()) mod=998244353 if H>W: H,W=W,H P=pow(2,H-1,mod) ANS=4*pow(P,W-1,mod) print(ANS%mod)