h,w=map(int,input().split()) M=998244353 print(pow(2,(h-2)*(w-2)+(h-2)+(w-2),M)*2*4%M)