#include <bits/stdc++.h>
constexpr const int64_t mod = 998244353;
int64_t dp[1005][2005][4];
int n, k;
int main(int argc, char* argv[]) {
  scanf("%d%d", &n, &k);
  std::fill(dp[1][0], dp[1][0] + 4, 1LL);
  for (int i = 2; i <= n; ++i) {
    for (int j = 0; j < k; ++j) {
      dp[i][j][0] = dp[i - 1][j][0];
      if (j >= 1) {
        dp[i][j][0] +=
            dp[i - 1][j - 1][1] + dp[i - 1][j - 1][2] + dp[i - 1][j - 1][3];
        dp[i][j][0] %= mod;
      }
      dp[i][j][1] = dp[i - 1][j][0] + dp[i - 1][j][1] + dp[i - 1][j][3];
      if (j >= 2) dp[i][j][1] += dp[i - 1][j - 2][2];
      dp[i][j][1] %= mod;
      dp[i][j][2] = dp[i - 1][j][0] + dp[i - 1][j][2] + dp[i - 1][j][3];
      if (j >= 2) dp[i][j][2] += dp[i - 1][j - 2][1];
      dp[i][j][2] %= mod;
      dp[i][j][3] = dp[i - 1][j][3];
      if (j >= 1) {
        dp[i][j][3] +=
            dp[i - 1][j - 1][0] + dp[i - 1][j - 1][1] + dp[i - 1][j - 1][2];
        dp[i][j][3] %= mod;
      }
    }
  }
  int64_t ans = dp[n][k - 1][0] + dp[n][k - 1][3];
  if (k >= 2) ans += dp[n][k - 2][1] + dp[n][k - 2][2];
  ans %= mod;
  printf("%lld\n", ans);
  return 0;
}
