#include <bits/stdc++.h>
using namespace std;
long long dp[1002][2002][2][2];
int main() {
  memset(dp, 0, sizeof dp);
  int n, k1;
  scanf("%d %d", &n, &k1);
  dp[0][1][0][0] = 1;
  dp[0][2][0][1] = 1;
  dp[0][2][1][0] = 1;
  dp[0][1][1][1] = 1;
  int mod = 998244353;
  for (__typeof(n) i = 0; i < n; i++)
    for (__typeof(k1 + 1) j = 1; j < k1 + 1; j++)
      for (__typeof(2) k = 0; k < 2; k++)
        for (__typeof(2) l = 0; l < 2; l++) {
          if (k == 0 and l == 0) {
            dp[i + 1][j][0][0] = (dp[i][j][k][l] + dp[i + 1][j][0][0]) % mod;
            dp[i + 1][j + 1][1][0] =
                (dp[i][j][k][l] + dp[i + 1][j + 1][1][0]) % mod;
            dp[i + 1][j + 1][0][1] =
                (dp[i][j][k][l] + dp[i + 1][j + 1][0][1]) % mod;
            dp[i + 1][j + 1][1][1] =
                (dp[i][j][k][l] + dp[i + 1][j + 1][1][1]) % mod;
          } else if (k == 0 and l == 1) {
            dp[i + 1][j][0][1] = (dp[i][j][k][l] + dp[i + 1][j][0][1]) % mod;
            dp[i + 1][j + 2][1][0] =
                (dp[i][j][k][l] + dp[i + 1][j + 2][1][0]) % mod;
            dp[i + 1][j][1][1] = (dp[i][j][k][l] + dp[i + 1][j][1][1]) % mod;
            dp[i + 1][j][0][0] = (dp[i][j][k][l] + dp[i + 1][j][0][0]) % mod;
          } else if (k == 1 and l == 0) {
            dp[i + 1][j][1][0] = (dp[i][j][k][l] + dp[i + 1][j][1][0]) % mod;
            dp[i + 1][j + 2][0][1] =
                (dp[i][j][k][l] + dp[i + 1][j + 2][0][1]) % mod;
            dp[i + 1][j][1][1] = (dp[i][j][k][l] + dp[i + 1][j][1][1]) % mod;
            dp[i + 1][j][0][0] = (dp[i][j][k][l] + dp[i + 1][j][0][0]) % mod;
          } else {
            dp[i + 1][j + 1][0][0] =
                (dp[i][j][k][l] + dp[i + 1][j + 1][0][0]) % mod;
            dp[i + 1][j + 1][1][0] =
                (dp[i][j][k][l] + dp[i + 1][j + 1][1][0]) % mod;
            dp[i + 1][j + 1][0][1] =
                (dp[i][j][k][l] + dp[i + 1][j + 1][0][1]) % mod;
            dp[i + 1][j][1][1] = (dp[i][j][k][l] + dp[i + 1][j][1][1]) % mod;
          }
        }
  cout << (dp[n - 1][k1][0][1] + dp[n - 1][k1][0][0] + dp[n - 1][k1][1][0] +
           dp[n - 1][k1][1][1]) %
              mod
       << endl;
  return 0;
}
