#include <bits/stdc++.h>
using namespace std;
const int N = 1e3 + 5;
const int MOD = 998244353;
int n, k;
long long dp[N][2 * N][4];
int main() {
  scanf("%d%d", &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][j][0] += dp[i - 1][j][1];
      dp[i][j][0] += dp[i - 1][j][2];
      dp[i][j][0] += dp[i - 1][j - 1][3];
      dp[i][j][0] %= MOD;
      dp[i][j][1] += dp[i - 1][j - 1][0];
      dp[i][j][1] += dp[i - 1][j][1];
      if (j >= 2) dp[i][j][1] += dp[i - 1][j - 2][2];
      dp[i][j][1] += dp[i - 1][j - 1][3];
      dp[i][j][1] %= MOD;
      dp[i][j][2] += dp[i - 1][j - 1][0];
      if (j >= 2) dp[i][j][2] += dp[i - 1][j - 2][1];
      dp[i][j][2] += dp[i - 1][j][2];
      dp[i][j][2] += dp[i - 1][j - 1][3];
      dp[i][j][2] %= MOD;
      dp[i][j][3] += dp[i - 1][j - 1][0];
      dp[i][j][3] += dp[i - 1][j][1];
      dp[i][j][3] += dp[i - 1][j][2];
      dp[i][j][3] += dp[i - 1][j][3];
      dp[i][j][3] %= MOD;
    }
  }
  long long ans = dp[n][k][0];
  ans = (ans + dp[n][k][1]) % MOD;
  ans = (ans + dp[n][k][2]) % MOD;
  ans = (ans + dp[n][k][3]) % MOD;
  printf("%lld\n", ans);
}
