#include <bits/stdc++.h>
using namespace std;
long long dp[1006][3000][4];
const int mod = 998244353;
int main() {
  int n, k;
  cin >> 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][2] + dp[i - 1][j][1] +
                    dp[i - 1][j - 1][3];
      dp[i][j][1] = dp[i - 1][j - 1][0] + ((j >= 2) ? dp[i - 1][j - 2][2] : 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] +
                    ((j >= 2) ? dp[i - 1][j - 2][1] : 0) + dp[i - 1][j - 1][3];
      dp[i][j][3] = dp[i - 1][j - 1][0] + dp[i - 1][j][2] + dp[i - 1][j][1] +
                    dp[i - 1][j][3];
      dp[i][j][0] %= mod;
      dp[i][j][1] %= mod;
      dp[i][j][2] %= mod;
      dp[i][j][3] %= mod;
    }
  }
  cout << (dp[n][k][0] + dp[n][k][1] + dp[n][k][2] + dp[n][k][3]) % mod << endl;
  return 0;
}
