#include <bits/stdc++.h>
using namespace std;
const long long MOD = 998244353;
const int N = 1e3 + 3e1;
long long Memo[N][N * 2][2][2];
int n, k;
long long Ans;
long long Calc(int i, int beautiBico, bool F, bool S) {
  if (i == n) return (beautiBico == k);
  if (beautiBico > k) return 0;
  long long &Re = Memo[i][beautiBico][F][S];
  if (Re + 1) return Re % MOD;
  Re = 0;
  Re += Calc(i + 1, beautiBico + (F != 0 && S != 0), 0, 0);
  Re %= MOD;
  Re += Calc(i + 1, beautiBico + (F != 1) + (S != 0), 1, 0);
  Re %= MOD;
  Re += Calc(i + 1, beautiBico + (F != 0) + (S != 1), 0, 1);
  Re %= MOD;
  Re += Calc(i + 1, beautiBico + (F != 1 && S != 1), 1, 1);
  Re %= MOD;
  return Re % MOD;
}
int main() {
  cin >> n >> k;
  memset(Memo, -1, sizeof Memo);
  Ans += Calc(1, 1, 0, 0);
  Ans %= MOD;
  Ans += Calc(1, 2, 1, 0);
  Ans %= MOD;
  Ans += Calc(1, 2, 0, 1);
  Ans %= MOD;
  Ans += Calc(1, 1, 1, 1);
  Ans %= MOD;
  return cout << Ans, 0;
}
