#include <bits/stdc++.h>
using namespace std;
const long long MOD = 998244353;
long long f[1010][2010][4];
int n, t;
inline long long sigama(long long a, long long b, long long c, long long d) {
  return (((a + b) % MOD + c) % MOD + d) % MOD;
}
int main() {
  register int i, j, k;
  scanf("%d%d", &n, &t);
  f[1][1][0] = 1;
  f[1][2][1] = 1;
  f[1][2][2] = 1;
  f[1][1][3] = 1;
  for (i = 2; i <= n; ++i) {
    for (j = 1; j <= t; ++j) {
      f[i][j][0] = sigama(f[i - 1][j][1], f[i - 1][j][2], f[i - 1][j - 1][3],
                          f[i - 1][j][0]);
      f[i][j][1] = sigama(f[i - 1][j][1], f[i - 1][j - 1][0],
                          f[i - 1][j - 2][2], f[i - 1][j - 1][3]);
      f[i][j][2] = sigama(f[i - 1][j - 1][0], f[i - 1][j - 2][1],
                          f[i - 1][j][2], f[i - 1][j - 1][3]);
      f[i][j][3] = sigama(f[i - 1][j - 1][0], f[i - 1][j][1], f[i - 1][j][2],
                          f[i - 1][j][3]);
    }
  }
  printf("%lld", sigama(f[n][t][0], f[n][t][1], f[n][t][2], f[n][t][3]) % MOD);
}
