#include <bits/stdc++.h>
using namespace std;
long long mod = 998244353;
long long dp[1001][2001][4];
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, k;
  cin >> n >> k;
  dp[0][0][0] = 1;
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j <= 2 * i; j++) {
      for (long long last = 0; last < 4; last++) {
        for (long long cur = 0; cur < 4; cur++) {
          long long new_c = 0;
          if (i == 0) {
            new_c = cur == 0 || cur == 3 ? 1 : 2;
          } else {
            if (last == 0 || last == 3) {
              new_c = cur == last ? 0 : 1;
            } else {
              new_c = cur + last == 3 ? 2 : 0;
            }
          }
          if (j + new_c <= k) {
            dp[i + 1][j + new_c][cur] += dp[i][j][last];
            dp[i + 1][j + new_c][cur] %= mod;
          }
        }
      }
    }
  }
  long long ans = 0;
  for (long long last = 0; last < 4; last++) {
    ans += dp[n][k][last];
    ans %= mod;
  }
  cout << ans << endl;
}
