#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
const long long md = 998244353;
mt19937 rnd(100500);
long long n, k, dp[1001][4][2001];
int add(int m1, int m2) {
  bitset<2> b1 = m1, b2 = m2;
  int cnt1 = 0, cnt2 = 0;
  if (b1[0] == b2[0]) {
    cnt1++;
    if (b2[0] == b2[1]) cnt1++;
  }
  if (b1[1] == b2[1]) {
    cnt2++;
    if (b2[1] == b2[0]) cnt2++;
  }
  if (cnt1 + cnt2 >= 2) return 0;
  if (cnt1 + cnt2 == 1) return 1;
  if (b2[0] == b2[1])
    return 1;
  else
    return 2;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> k;
  dp[0][0][1] = dp[0][3][1] = 1;
  dp[0][1][2] = dp[0][2][2] = 1;
  for (int i = 0; i < n; i++) {
    for (int mask1 = 0; mask1 < 4; mask1++) {
      for (int mask2 = 0; mask2 < 4; mask2++) {
        for (int j = 0; j <= 2 * n; j++) {
          if (j + add(mask1, mask2) <= k) {
            dp[i + 1][mask2][j + add(mask1, mask2)] += dp[i][mask1][j];
            dp[i + 1][mask2][j + add(mask1, mask2)] %= md;
          }
        }
      }
    }
  }
  int ans = 0;
  for (int m = 0; m < 4; m++) {
    ans += dp[n - 1][m][k];
    ans %= md;
  }
  cout << ans;
  return 0;
}
