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