h, w = map(int, input().split()) assert 2 <= h <= 10 ** 9 assert 2 <= w <= 10 ** 9 mod = 998244353 print(pow(2, (h-1)*(w-1)+2%(mod-1)) % mod)