#include <bits/stdc++.h>
using namespace std;
long long dp[1002][2006][6], n, k, MOD = 998244353;
long long solve(int pos, int comp, int last) {
  if (pos == n) {
    return comp == k;
  }
  if (comp > k) {
    return 0;
  }
  if (dp[pos][comp][last] < 0) {
    dp[pos][comp][last] = 0;
    if (last == 0) {
      dp[pos][comp][last] =
          (dp[pos][comp][last] + solve(pos + 1, comp, 0)) % MOD;
      dp[pos][comp][last] =
          (dp[pos][comp][last] + solve(pos + 1, comp + 1, 1)) % MOD;
      dp[pos][comp][last] =
          (dp[pos][comp][last] + solve(pos + 1, comp + 1, 2)) % MOD;
      dp[pos][comp][last] =
          (dp[pos][comp][last] + solve(pos + 1, comp + 1, 3)) % MOD;
    }
    if (last == 1) {
      dp[pos][comp][last] =
          (dp[pos][comp][last] + solve(pos + 1, comp, 0)) % MOD;
      dp[pos][comp][last] =
          (dp[pos][comp][last] + solve(pos + 1, comp, 1)) % MOD;
      dp[pos][comp][last] =
          (dp[pos][comp][last] + solve(pos + 1, comp + 2, 2)) % MOD;
      dp[pos][comp][last] =
          (dp[pos][comp][last] + solve(pos + 1, comp, 3)) % MOD;
    }
    if (last == 2) {
      dp[pos][comp][last] =
          (dp[pos][comp][last] + solve(pos + 1, comp, 0)) % MOD;
      dp[pos][comp][last] =
          (dp[pos][comp][last] + solve(pos + 1, comp + 2, 1)) % MOD;
      dp[pos][comp][last] =
          (dp[pos][comp][last] + solve(pos + 1, comp, 2)) % MOD;
      dp[pos][comp][last] =
          (dp[pos][comp][last] + solve(pos + 1, comp, 3)) % MOD;
    }
    if (last == 3) {
      dp[pos][comp][last] =
          (dp[pos][comp][last] + solve(pos + 1, comp + 1, 0)) % MOD;
      dp[pos][comp][last] =
          (dp[pos][comp][last] + solve(pos + 1, comp + 1, 1)) % MOD;
      dp[pos][comp][last] =
          (dp[pos][comp][last] + solve(pos + 1, comp + 1, 2)) % MOD;
      dp[pos][comp][last] =
          (dp[pos][comp][last] + solve(pos + 1, comp, 3)) % MOD;
    }
    if (last == 4) {
      dp[pos][comp][last] =
          (dp[pos][comp][last] + solve(pos + 1, comp + 1, 0)) % MOD;
      dp[pos][comp][last] =
          (dp[pos][comp][last] + solve(pos + 1, comp + 2, 1)) % MOD;
      dp[pos][comp][last] =
          (dp[pos][comp][last] + solve(pos + 1, comp + 2, 2)) % MOD;
      dp[pos][comp][last] =
          (dp[pos][comp][last] + solve(pos + 1, comp + 1, 3)) % MOD;
    }
  }
  return dp[pos][comp][last];
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k;
  memset(dp, -1, sizeof(dp));
  cout << solve(0, 0, 4) << endl;
}
