#include <bits/stdc++.h>
using namespace std;
long long f[2100][2100][5];
int n, k;
int main() {
  scanf("%d%d", &n, &k);
  f[1][1][0] = 1, f[1][1][1] = 1, f[1][2][2] = 1, f[1][2][3] = 1;
  for (int i = 2; i <= n; i++)
    for (int j = 1; j <= k; j++)
      for (int l = 0; l < 4; l++)
        for (int t = 0; t < 4; t++)
          if (l == t)
            f[i][j][l] += f[i - 1][j][t];
          else if (((l == 2 && t == 3) || (l == 3 && t == 2)) && j >= 2)
            (f[i][j][l] += f[i - 1][j - 2][t]) %= 998244353;
          else if (((l == 0 && t == 1) || (l == 1 && t == 0)) && j >= 1)
            (f[i][j][l] += f[i - 1][j - 1][t]) %= 998244353;
          else if (((l == 2 && t == 0) || (l == 3 && t == 0)) && j >= 1)
            (f[i][j][l] += f[i - 1][j - 1][t]) %= 998244353;
          else if (((l == 2 && t == 1) || (l == 3 && t == 1)) && j >= 1)
            (f[i][j][l] += f[i - 1][j - 1][t]) %= 998244353;
          else if (((l == 0 && t == 2) || (l == 0 && t == 3)) && j >= 1)
            (f[i][j][l] += f[i - 1][j][t]) %= 998244353;
          else if (((l == 1 && t == 2) || (l == 1 && t == 3)) && j >= 1)
            (f[i][j][l] += f[i - 1][j][t]) %= 998244353;
  printf("%lld\n",
         (f[n][k][0] + f[n][k][1] + f[n][k][2] + f[n][k][3]) % 998244353);
  fclose(stdin), fclose(stdout);
  return 0;
}
