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