#include <bits/stdc++.h>
using namespace std;
long long dp[1001][2001][4];
long long ans(int i, int k, int state, int last) {
  if (k < 0) return 0;
  if (dp[i][k][state] != -1) return dp[i][k][state];
  long long sum;
  if (i == 1) {
    sum = (ans(i + 1, k - 1, 0, last) + ans(i + 1, k - 1, 1, last) +
           ans(i + 1, k - 2, 2, last) + ans(i + 1, k - 2, 3, last)) %
          998244353;
  } else if (k == 0 && i == last) {
    if (state == 0 || state == 1)
      sum = 1;
    else
      sum = 3;
  } else if (k == 1 && i == last) {
    if (state == 0 || state == 1)
      sum = 3;
    else
      sum = 0;
  } else if (k == 2 && i == last) {
    if (state == 0 || state == 1)
      sum = 0;
    else
      sum = 1;
  } else if (k > 2 && i == last) {
    sum = 0;
  } else {
    if (state == 0) {
      sum = (ans(i + 1, k, 0, last) + ans(i + 1, k - 1, 2, last) +
             ans(i + 1, k - 1, 1, last) + ans(i + 1, k - 1, 3, last)) %
            998244353;
    }
    if (state == 1) {
      sum = (ans(i + 1, k, 1, last) + ans(i + 1, k - 1, 0, last) +
             ans(i + 1, k - 1, 2, last) + ans(i + 1, k - 1, 3, last)) %
            998244353;
    }
    if (state == 2) {
      sum = (ans(i + 1, k, 0, last) + ans(i + 1, k, 1, last) +
             ans(i + 1, k, 2, last) + ans(i + 1, k - 2, 3, last)) %
            998244353;
    }
    if (state == 3) {
      sum = (ans(i + 1, k, 0, last) + ans(i + 1, k, 1, last) +
             ans(i + 1, k - 2, 2, last) + ans(i + 1, k, 3, last)) %
            998244353;
    }
  }
  dp[i][k][state] = sum;
  return sum;
}
int main() {
  int n, k;
  cin >> n >> k;
  for (int i = 0; i <= 1000; ++i)
    for (int j = 0; j <= 2000; ++j)
      for (int k = 0; k < 4; ++k) dp[i][j][k] = -1;
  long long a;
  if (n == 1) {
    if (k == 1)
      a = 2;
    else if (k == 2)
      a = 2;
    else
      a = 0;
  } else {
    a = ans(1, k, 0, n);
  }
  cout << a % 998244353;
  return 0;
}

### Prompt

Develop a solution in cpp to the problem described below:

You are given a grid, consisting of 2 rows and n columns. Each cell of this grid should be colored either black or white.

Two cells are considered neighbours if they have a common border and share the same color. Two cells A and B belong to the same component if they are neighbours, or if there is a neighbour of A that belongs to the same component with B.

Let's call some bicoloring beautiful if it has exactly k components.

Count the number of beautiful bicolorings. The number can be big enough, so print the answer modulo 998244353.

Input

The only line contains two integers n and k (1 ≤ n ≤ 1000, 1 ≤ k ≤ 2n) — the number of columns in a grid and the number of components required.

Output

Print a single integer — the number of beautiful bicolorings modulo 998244353.

Examples

Input

3 4


Output

12


Input

4 1


Output

2


Input

1 2


Output

2

Note

One of possible bicolorings in sample 1:

<image>

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
long long dp[1001][2001][4];
long long ans(int i, int k, int state, int last) {
  if (k < 0) return 0;
  if (dp[i][k][state] != -1) return dp[i][k][state];
  long long sum;
  if (i == 1) {
    sum = (ans(i + 1, k - 1, 0, last) + ans(i + 1, k - 1, 1, last) +
           ans(i + 1, k - 2, 2, last) + ans(i + 1, k - 2, 3, last)) %
          998244353;
  } else if (k == 0 && i == last) {
    if (state == 0 || state == 1)
      sum = 1;
    else
      sum = 3;
  } else if (k == 1 && i == last) {
    if (state == 0 || state == 1)
      sum = 3;
    else
      sum = 0;
  } else if (k == 2 && i == last) {
    if (state == 0 || state == 1)
      sum = 0;
    else
      sum = 1;
  } else if (k > 2 && i == last) {
    sum = 0;
  } else {
    if (state == 0) {
      sum = (ans(i + 1, k, 0, last) + ans(i + 1, k - 1, 2, last) +
             ans(i + 1, k - 1, 1, last) + ans(i + 1, k - 1, 3, last)) %
            998244353;
    }
    if (state == 1) {
      sum = (ans(i + 1, k, 1, last) + ans(i + 1, k - 1, 0, last) +
             ans(i + 1, k - 1, 2, last) + ans(i + 1, k - 1, 3, last)) %
            998244353;
    }
    if (state == 2) {
      sum = (ans(i + 1, k, 0, last) + ans(i + 1, k, 1, last) +
             ans(i + 1, k, 2, last) + ans(i + 1, k - 2, 3, last)) %
            998244353;
    }
    if (state == 3) {
      sum = (ans(i + 1, k, 0, last) + ans(i + 1, k, 1, last) +
             ans(i + 1, k - 2, 2, last) + ans(i + 1, k, 3, last)) %
            998244353;
    }
  }
  dp[i][k][state] = sum;
  return sum;
}
int main() {
  int n, k;
  cin >> n >> k;
  for (int i = 0; i <= 1000; ++i)
    for (int j = 0; j <= 2000; ++j)
      for (int k = 0; k < 4; ++k) dp[i][j][k] = -1;
  long long a;
  if (n == 1) {
    if (k == 1)
      a = 2;
    else if (k == 2)
      a = 2;
    else
      a = 0;
  } else {
    a = ans(1, k, 0, n);
  }
  cout << a % 998244353;
  return 0;
}

```