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