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 long ll;
typedef long double ld;
const int mod = 998244353;
int sum(int a, int b) {
    int s = a + b;
    if (s >= mod) s -= mod;
    return s;
}
int mult(int a, int b) {
    return (1LL * a * b) % mod;
}
int sub(int a, int b) {
    int s = a - b;
    if (s < 0) s += mod;
    return s;
}
const int maxN = 3005;
int c[2 * maxN][2 * maxN];
int x, n;
int f[2 * maxN];
int dp[2 * maxN][2 * maxN];
int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    //freopen("input.txt", "r", stdin);
    cin >> n >> x;
    c[0][0] = 1;
    for (int i = 1; i < maxN; i++) {
        c[i][0] = 1;
        for (int j = 1; j <= i; j++) {
            c[i][j] = sum(c[i - 1][j], c[i - 1][j - 1]);
        }
    }
    dp[0][0] = 1;
    for (int i = 0; i + 1 <= n; i++) {
        for (int j = 0; j <= 2 * i + 2; j++) {
            dp[i + 1][j + 1] = sum(dp[i + 1][j + 1], dp[i][j]);
            dp[i + 1][j + 2] = sum(dp[i + 1][j + 2], dp[i][j]);
        }
    }
    for (int t = x + 1; t <= 2 * n; t++) {
        int k1 = (t - x + 1) / 2;
        if (t % 2 == x % 2) continue;
        if (x % 2 == 0 && 2 * k1 >= x) continue;
        if (2 * k1 + 2 * k1 >= t) {
            if (x % 2 == 0) continue;
            if (t % 2 != 0) continue;
            f[t / 2] += 1;
            if (f[t / 2] >= mod) f[t / 2] -= mod;
            continue;
        }
        int le = t - 4 * k1;
        for (int j = 0; j <= le; j++) {
            f[j + 2 * k1] = f[j + 2 * k1] + dp[j][le];
            if (f[j + 2 * k1] >= mod) f[j + 2 * k1] -= mod;
        }
    }
    /*if (x % 2 == 1) {
        for (int i = (x / 2 + 1); i <= n; i++) {
            f[i]++;
        }
    }
    else {
        for (int sum = x + 1; sum <= 2 * x - 1; sum += 2) {
            f[sum / 2 + 1]++;
        }
    }*/
    int ans = 0;
    for (int i = 0; i <= n; i++) {
        for (int j = 0; j < x; j++) {
            f[i] = sum(f[i], dp[i][j]);
        }
        ans = sum(ans, mult(f[i], c[n][i]));
    }
    cout << ans;
    return 0;
}