#include <bits/stdc++.h>
int B = 400;
using namespace std;
const long long inf = 1e12;
const int M = 998244353;
const int mxn = 300010;
long long dp[1010][2010][2][2];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, k;
  cin >> n >> k;
  dp[1][1][0][0] = 1, dp[1][2][0][1] = 1, dp[1][1][1][1] = 1,
  dp[1][2][1][0] = 1;
  for (int i = 2; i <= n; i++)
    for (int j = 1; j <= k; j++) {
      dp[i][j][0][0] = (dp[i - 1][j][0][0] + dp[i - 1][j][1][0] +
                        dp[i - 1][j][0][1] + dp[i - 1][j - 1][1][1]) %
                       M;
      if (j >= 2) {
        dp[i][j][0][1] = (dp[i - 1][j][0][1] + dp[i - 1][j - 1][1][1] +
                          dp[i - 1][j - 1][0][0] + dp[i - 1][j - 2][1][0]) %
                         M;
        dp[i][j][1][0] = (dp[i - 1][j - 1][0][0] + dp[i - 1][j][1][0] +
                          dp[i - 1][j - 1][1][1] + dp[i - 1][j - 2][0][1]) %
                         M;
      }
      dp[i][j][1][1] = (dp[i - 1][j][1][1] + dp[i - 1][j][1][0] +
                        dp[i - 1][j][0][1] + dp[i - 1][j - 1][0][0]) %
                       M;
    }
  cout << (dp[n][k][0][0] + dp[n][k][0][1] + dp[n][k][1][0] + dp[n][k][1][1]) %
              M
       << endl;
}
