#include <bits/stdc++.h>
using namespace std;
unsigned long long int exp(unsigned long long int b,
                           unsigned long long int count) {
  unsigned long long int num;
  if (count == 1) {
    num = b * b;
    num = num % 998244353;
    return (num);
  } else if (count == 0)
    return (1);
  num = b * b;
  num = num % 998244353;
  num = exp(num, count - 1);
  num = num % 998244353;
  return (num);
}
unsigned long long int value(unsigned long long int b) {
  unsigned long long int count, i, j, a, num, rem;
  if (b == 0) {
    return (1);
  } else if (b == 1) {
    return (2);
  } else if (b == 2) {
    return (4);
  } else if (b == 3) {
    return (8);
  } else {
    count = 1;
    for (i = 4; 1; i = i * 2) {
      if (b / i == 0) {
        break;
      }
      count++;
    }
    i = i / 2;
    rem = b - i;
    num = exp(2, count);
    num = num * value(rem);
    num = num % 998244353;
    return (num);
  }
}
int main() {
  long long int a, b, c, i, j, k, m, n;
  long long int num = 998244353;
  cin >> a >> b;
  long long int final = a + b;
  final = value(final);
  final = final % num;
  cout << final << "\n";
}
