#include <bits/stdc++.h>
using namespace std;
long long int dp[1005][2005][2][2];
long long int count(long long int n, long long int k, long long int x1,
                    long long int x2) {
  if (n == 0) return (k == 0 ? 1 : 0);
  if (k < 0) return 0;
  if (dp[n][k][x1][x2] != -1) return dp[n][k][x1][x2];
  if (x1 == x2)
    return dp[n][k][x1][x2] = (count(n - 1, k - 1, !x1, !x2) % 998244353 +
                               count(n - 1, k, x1, x2) % 998244353 +
                               count(n - 1, k - 1, !x1, x2) % 998244353 +
                               count(n - 1, k - 1, x1, !x2) % 998244353) %
                              998244353;
  else
    return dp[n][k][x1][x2] = (count(n - 1, k - 2, !x1, !x2) % 998244353 +
                               count(n - 1, k, x1, x2) % 998244353 +
                               count(n - 1, k, !x1, x2) % 998244353 +
                               count(n - 1, k, x1, !x2) % 998244353) %
                              998244353;
}
int main() {
  long long int n, k;
  memset(dp, -1, sizeof(dp));
  cin >> n >> k;
  cout << (count(n - 1, k - 1, 0, 0) + count(n - 1, k - 1, 1, 1) +
           count(n - 1, k - 2, 1, 0) + count(n - 1, k - 2, 0, 1)) %
              998244353;
}
