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