#include <bits/stdc++.h>
using namespace std;
long long n, k, dp[1002][2002][4][4], mod = 998244353;
long long solve(long long i, long long fo2, long long t7t, long long rem) {
  if (rem < 0) return 0;
  if (dp[i][rem][fo2][t7t] != -1) return dp[i][rem][fo2][t7t];
  if (i > n) return rem == 0;
  long long ans = 0;
  ans += solve(i + 1, 1, 1, rem - (fo2 != 1 && t7t != 1));
  ans %= mod;
  ans += solve(i + 1, 2, 2, rem - (fo2 != 2 && t7t != 2));
  ans %= mod;
  ans += solve(i + 1, 1, 2, rem - (fo2 != 1) - (t7t != 2));
  ans %= mod;
  ans += solve(i + 1, 2, 1, rem - (fo2 != 2) - (t7t != 1));
  ans %= mod;
  return dp[i][rem][fo2][t7t] = ans;
}
int main() {
  memset(dp, -1, sizeof dp);
  cin >> n >> k;
  cout << solve(1, 0, 0, k) << "\n";
  return 0;
}
