#include <bits/stdc++.h>
using namespace std;
const long long M = 998244353;
const long long N = 1010;
long long dp[N][2 * N][2][2];
signed main() {
  long long n, k;
  cin >> n >> k;
  dp[1][1][0][0] = dp[1][2][0][1] = dp[1][2][1][0] = dp[1][1][1][1] = 1;
  for (long long i = 2; i <= n; i++) {
    for (long long j = 1; j <= k; j++) {
      dp[i][j][0][0] += dp[i - 1][j][0][0];
      dp[i][j][0][0] %= M;
      dp[i][j][0][0] += dp[i - 1][j][0][1];
      dp[i][j][0][0] %= M;
      dp[i][j][0][0] += dp[i - 1][j][1][0];
      dp[i][j][0][0] %= M;
      dp[i][j][0][0] += dp[i - 1][j - 1][1][1];
      dp[i][j][0][1] += dp[i - 1][j][0][1];
      dp[i][j][0][1] %= M;
      dp[i][j][0][1] += dp[i - 1][j - 1][1][1];
      dp[i][j][0][1] %= M;
      dp[i][j][0][1] += dp[i - 1][j - 1][0][0];
      dp[i][j][0][1] %= M;
      if (j >= 2) dp[i][j][0][1] += dp[i - 1][j - 2][1][0];
      dp[i][j][0][1] %= M;
      dp[i][j][1][0] += dp[i - 1][j][1][0];
      dp[i][j][1][0] %= M;
      dp[i][j][1][0] += dp[i - 1][j - 1][1][1];
      dp[i][j][1][0] %= M;
      dp[i][j][1][0] += dp[i - 1][j - 1][0][0];
      dp[i][j][1][0] %= M;
      if (j >= 2) dp[i][j][1][0] += dp[i - 1][j - 2][0][1];
      dp[i][j][1][0] %= M;
      dp[i][j][1][1] += dp[i - 1][j - 1][0][0];
      dp[i][j][1][1] %= M;
      dp[i][j][1][1] += dp[i - 1][j][0][1];
      dp[i][j][1][1] %= M;
      dp[i][j][1][1] += dp[i - 1][j][1][0];
      dp[i][j][1][1] %= M;
      dp[i][j][1][1] += dp[i - 1][j][1][1];
    }
  }
  cout << ((dp[n][k][1][1] + dp[n][k][0][0]) % M +
           (dp[n][k][0][1] + dp[n][k][1][0]) % M) %
              M;
  return 0;
}
