#include <bits/stdc++.h>
using namespace std;
const int maxN = 1007;
const int mod = 998244353;
long long dp[maxN][maxN * 2][4];
int main() {
  int n, k;
  cin >> n >> k;
  dp[1][1][0] = dp[1][1][3] = 1;
  dp[1][2][1] = dp[1][2][2] = 1;
  for (int i = 2; i <= n; i++)
    for (int j = 1; j <= k; j++) {
      dp[i][j][0] = dp[i - 1][j][0] + dp[i - 1][j][1] + dp[i - 1][j][2] +
                    dp[i - 1][j - 1][3];
      dp[i][j][3] = dp[i - 1][j][3] + dp[i - 1][j][1] + dp[i - 1][j][2] +
                    dp[i - 1][j - 1][0];
      dp[i][j][1] = dp[i - 1][j - 1][0] + dp[i - 1][j][1] + dp[i - 1][j - 1][3];
      dp[i][j][2] = dp[i - 1][j - 1][0] + dp[i - 1][j][2] + dp[i - 1][j - 1][3];
      if (j >= 2) {
        dp[i][j][1] += dp[i - 1][j - 2][2];
        dp[i][j][2] += dp[i - 1][j - 2][1];
      }
      for (int kk = 0; kk < 4; kk++) dp[i][j][kk] %= mod;
    }
  long long ans = 0;
  for (int i = 0; i < 4; i++) ans += dp[n][k][i];
  ans %= mod;
  cout << ans << endl;
  return 0;
}
