#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, k;
  cin >> n >> k;
  vector<vector<vector<long long>>> a(
      n, vector<vector<long long>>(4, vector<long long>(k + 3, 0)));
  a[0][0][1] = 1;
  a[0][1][2] = 1;
  a[0][2][2] = 1;
  a[0][3][1] = 1;
  long long MOD = 998244353ll;
  for (int i = 0; i < n - 1; i++) {
    for (int j = 0; j <= k; j++) {
      for (int x1 = 0; x1 < 4; x1++) {
        for (int x2 = 0; x2 < 4; x2++) {
          if ((x1 == 1 && x2 == 2) || (x1 == 2 && x2 == 1)) {
            a[i + 1][x2][j + 2] = (a[i + 1][x2][j + 2] + a[i][x1][j]) % MOD;
          } else if ((x1 == x2) || (x1 == 1) || (x1 == 2)) {
            a[i + 1][x2][j] = (a[i + 1][x2][j] + a[i][x1][j]) % MOD;
          } else {
            a[i + 1][x2][j + 1] = (a[i + 1][x2][j + 1] + a[i][x1][j]) % MOD;
          }
        }
      }
    }
  }
  long long ans = 0ll;
  for (int j = 0; j < 4; j++) {
    ans = (ans + a[n - 1][j][k]) % MOD;
  }
  cout << ans << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  solve();
  return 0;
}
