#include <bits/stdc++.h>   using namespace std;   const int modd = 998244353;   const int maxn = 2000 + 10;   int n, k;   long long dp[maxn][maxn][4];   void solve() {     dp[1][1][0] = dp[1][1][3] = 1;     dp[1][2][1] = dp[1][2][2] = 1;     for (int i = 2; i <= n; i++) {       dp[i][1][0] = dp[i][1][3] = 1;       dp[i][1][1] = dp[i][1][2] = 0;       for (int j = 2; j <= k; j++) {         dp[i][j][0] = (dp[i - 1][j][0] % modd + dp[i - 1][j][1] % modd +                        dp[i - 1][j][2] % modd + dp[i - 1][j - 1][3] % modd) %                       modd;         dp[i][j][1] = (dp[i - 1][j - 1][0] % modd + dp[i - 1][j][1] % modd +                        dp[i - 1][j - 2][2] % modd + dp[i - 1][j - 1][3] % modd) %                       modd;         dp[i][j][2] = (dp[i - 1][j - 1][0] % modd + dp[i - 1][j - 2][1] % modd +                        dp[i - 1][j][2] % modd + dp[i - 1][j - 1][3] % modd) %                       modd;         dp[i][j][3] = (dp[i - 1][j - 1][0] % modd + dp[i - 1][j][1] % modd +                        dp[i - 1][j][2] % modd + dp[i - 1][j][3] % modd) %                       modd;       }     }   }   int main() {     cin >> n >> k;     solve();     cout << (dp[n][k][0] % modd + dp[n][k][1] % modd + dp[n][k][2] % modd +              dp[n][k][3] % modd) %                 modd          << endl;   }   