Find the number, modulo 998244353, of sequences of length N consisting of 0, 1 and 2 such that none of their contiguous subsequences totals to X.

Constraints

* 1 \leq N \leq 3000
* 1 \leq X \leq 2N
* N and X are integers.

Input

Input is given from Standard Input in the following format:


N X


Output

Print the number, modulo 998244353, of sequences that satisfy the condition.

Examples

Input

3 3


Output

14


Input

8 6


Output

1179


Input

10 1


Output

1024


Input

9 13


Output

18402


Input

314 159


Output

459765451
#include <bits/stdc++.h>
using namespace std;
typedef long double ld;
typedef long long ll;
typedef pair<double, double> pdd;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef pair<int, int> pii;
typedef vector<pii> vii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
const int mod = 998244353;

const int N = 6001;
int d[N][N], bin[N][N];

int main() {
  std::ios::sync_with_stdio(false); std::cin.tie(0);
  int n, x;
  cin >> n >> x;
  for (int n = 0; n < N; ++n) {
    bin[n][0] = 1;
    for (int i = 1; i <= n; ++i) {
      bin[n][i] = (bin[n - 1][i] + bin[n - 1][i - 1]) % mod;
    }
  }
  d[0][0] = d[1][0] = d[2][1] = 1;
  for (int l = 3; l < N; ++l) {
    for (int i = 1; i < l; ++i) {
      d[l][i] = (d[l - 1][i - 1] + d[l - 2][i - 1]) % mod;
    }
  }
  ll res = 0;
  for (int S = 0; S <= 2 * n; ++S) {
    vi bad(S + 1);
    for (int i = x; i <= S; ++i) {
      if (i % 2 == x % 2) {
        bad[i] = 1;
      } else {
        bad[i - x] = 1;
      }
    }
    if (bad.back()) continue;
//    cerr << "x: " << x << " S: " << S << endl;
//    for (int i = 0; i <= S; ++i) cerr << bad[i]; cerr << endl;
    bool fail = 0;
    int steps = n;
    for (int i = 0; i + 1 <= S; ++i) {
      if (bad[i] && bad[i + 1]) {
        fail = 1;
      }
      if (bad[i] && i > 0 && !bad[i-1] && i + 1 <= S && !bad[i+1]) --steps;
    }
    if (fail) break;
    int L = 0;
    for (int i = 0; i <= S; ++i) if (!bad[i]) {
      int l = 1;
      for (int j = i + 1; j <= S; ++j) {
        if (bad[j]) break;
        ++l;
      }
      if (l != 1) {
        assert(L == 0);
        L = l;
        i += l - 1;
      }
    }
    for (int i = 0; i <= steps; ++i) {
      res = (res + d[L][i] * (ll)bin[n][steps - i]) % mod;
    }
//    cerr << n << ' ' << steps << ' ' << res << endl;
  }
  cout << res << endl;
  return 0;
}