#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long INFLL = 0x3f3f3f3f3f3f3f3fLL;
const int MX = 1e3 + 5;
const int mod = 998244353;
long long dp[MX][MX << 1][4];
int main() {
  int n, m;
  cin >> n >> m;
  dp[1][1][0] = dp[1][1][3] = 1;
  dp[1][2][2] = dp[1][2][1] = 1;
  for (int i = 2; i < (n + 1); ++i)
    for (int j = 1; j < (2 * i + 1); ++j) {
      for (int k = 0; k < (4); ++k) dp[i][j][k] += dp[i - 1][j][k];
      dp[i][j][1] += dp[i - 1][j - 1][0];
      dp[i][j][2] += dp[i - 1][j - 1][0];
      dp[i][j][3] += dp[i - 1][j - 1][0];
      dp[i][j][0] += dp[i - 1][j][1];
      if (j > 2) dp[i][j][2] += dp[i - 1][j - 2][1];
      dp[i][j][3] += dp[i - 1][j][1];
      dp[i][j][0] += dp[i - 1][j][2];
      if (j > 2) dp[i][j][1] += dp[i - 1][j - 2][2];
      dp[i][j][3] += dp[i - 1][j][2];
      dp[i][j][0] += dp[i - 1][j - 1][3];
      dp[i][j][1] += dp[i - 1][j - 1][3];
      dp[i][j][2] += dp[i - 1][j - 1][3];
      for (int p = 0; p < (4); ++p)
        if (dp[i][j][p] >= mod) dp[i][j][p] %= mod;
    }
  int ans = 0;
  for (int k = 0; k < (4); ++k) ans = (ans + dp[n][m][k]) % mod;
  printf("%d\n", ans);
  return 0;
}
