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;

using ll = long long;

const int mod = 998244353, N = (int)3e3 + 5, X = 2 * N;
int n, x, dp[N][X], C[N << 1][N << 1], ans;

int add(int _a, int _b) {
    _a += _b;
    if (_a >= mod) _a -= mod;
    return _a;
}
int mul(int _a, int _b) { return (int)( (ll)_a * _b % mod); }

int candyDivision(int _n, int _s) { return C[_n - 1][_s + _n - 1]; }

int main() {
    scanf("%d %d", &n, &x);

    dp[0][0] = 1;
    for (int i = 0; i < n; ++i) {
        for (int j = 0; j <= (i << 1); ++j) if (dp[i][j]) {
            dp[i + 1][j + 1] = add(dp[i + 1][j + 1], dp[i][j]);
            dp[i + 1][j + 2] = add(dp[i + 1][j + 2], dp[i][j]);
        }
    }

    for (int i = 0; i < (N << 1); ++i) C[0][i] = C[i][i] = 1;
    for (int j = 1; j < (N << 1); ++j) {
        for (int i = 1; i < j; ++i) C[i][j] = add(C[i - 1][j - 1], C[i][j - 1]);
    }

    for (int i = 0; i <= n; ++i) {
        for (int j = 0; j < x; ++j) if (dp[i][j]) {
            ans = add(ans, mul(dp[i][j], candyDivision(i + 1, n - i) ) );
        }
    }

    for (int i = 1; ; ++i) {
        int rem = x - 1 - 2 * i;
        if (rem > 0) {
            int n_2 = i << 1;
            if (n_2 > n) break ;
            for (int j = 0; j <= n - n_2; ++j) ans = add(ans, mul(dp[j][rem], candyDivision(n_2 + j + 1, n - n_2 - j) ) );
        }
        else {
            if (!(x & 1) ) break ;
            int n_2 = (x >> 1) + i;
            if (n_2 > n) break ;
            ans = add(ans, candyDivision(n_2 + 1, n - n_2) );
        }
    }

    printf("%d", ans);

    return 0;
}
