#include <bits/stdc++.h>
using namespace std;
long long dp[1002][1002];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long h, w;
  cin >> h >> w;
  dp[1][1] = 4;
  for (long long i = 2; i <= w; i++) dp[1][i] = (dp[1][i - 1] * 2) % 998244353;
  for (long long i = 2; i <= h; i++) dp[i][1] = (dp[i - 1][1] * 2) % 998244353;
  for (long long i = 2; i <= h; i++) {
    for (long long j = 2; j <= w; j++) {
      dp[i][j] = (dp[i - 1][j] + dp[i][j - 1]) % 998244353;
    }
  }
  cout << dp[h][w];
}
