#include <bits/stdc++.h>
using namespace std;
const long long N = 1005;
long long dp[N][2 * N][4];
const long long MOD = 998244353;
int main() {
  for (long long k = 0; k < N; k++)
    for (long long l = 0; l < 2 * N; l++)
      for (long long m = 0; m < 4; m++) dp[k][l][m] = 0;
  long long a, b;
  cin >> a >> b;
  long long zer = 0;
  dp[1][1][0] = 1;
  dp[1][1][3] = 1;
  dp[1][2][1] = 1;
  dp[1][2][2] = 1;
  for (long long k = 1; k <= a; k++) {
    for (long long l = 1; l <= b; l++) {
      dp[k][l][0] = max(dp[k - 1][l][0] + dp[k - 1][l][1] + dp[k - 1][l][2] +
                            dp[k - 1][l - 1][3],
                        dp[k][l][0]) %
                    MOD;
      dp[k][l][1] = max(dp[k - 1][l - 1][0] + dp[k - 1][l][1] +
                            dp[k - 1][max(zer, l - 2)][2] + dp[k - 1][l - 1][3],
                        dp[k][l][1]) %
                    MOD;
      dp[k][l][2] = max(dp[k - 1][l - 1][0] + dp[k - 1][max(zer, l - 2)][1] +
                            dp[k - 1][l][2] + dp[k - 1][l - 1][3],
                        dp[k][l][2]) %
                    MOD;
      dp[k][l][3] = max(dp[k - 1][l - 1][0] + dp[k - 1][l][1] +
                            dp[k - 1][l][2] + dp[k - 1][l][3],
                        dp[k][l][3]) %
                    MOD;
    }
  }
  cout << (dp[a][b][0] + dp[a][b][1] + dp[a][b][2] + dp[a][b][3]) % MOD << endl;
}
