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;

#define N 3005

int dp[N][N*2], ap[N][N][2];

int n, X, f[N]={1,1}, rf[N]={1,1}, iv[N]={1,1};

const int mod = 998244353;

int add(int &a, int b) {
	a += b;
    if (a >= mod) a -= mod;
}
int sub(int &a, int b) {
    a -= b;
    if (a < 0) a += mod;
}
int C(int n, int k) {
	return 1ll * f[n] * rf[k] % mod * rf[n-k] % mod;
}

int main() {
    for (int i = 2; i < N; i ++) {
        f[i] = 1ll * f[i-1] * i % mod;
        iv[i] = 1ll * (mod/i) * (mod-iv[mod%i]) % mod;
        rf[i] = 1ll * rf[i-1] * iv[i] % mod;
    }
    ap[0][0][0] = 1;
    scanf("%d %d", &n, &X);
    if (X == 1) {
		int res = 1;
        for (int i = 1; i <= n; i ++) {
			res <<= 1;
			if (res >= mod) res -= mod;
        }
        printf("%d\n", res);
        return 0;
    }
    int up = X>>1;
    for (int d = 1; d <= n; d ++) {
        ap[d][0][0] = d+1;
        for (int e = 1; e <= up; e ++) {
            add(ap[d][e][0], ap[d-1][e][0]);
            add(ap[d][e][0], ap[d-1][e][1]);
            add(ap[d][e][1], ap[d-1][e-1][0]);
            add(ap[d][e][1], ap[d-1][e][1]);
        }
    }
    dp[0][0] = 1;
    for (int i = 1; i <= n; i ++) {
        for (int j = 0; j <= X; j ++) if (dp[i-1][j]) {
			add(dp[i][j+2], dp[i-1][j]);
            add(dp[i][j+1], dp[i-1][j]);
            add(dp[i][j], dp[i-1][j]);
        }
    }
    int ans = 0;
    for (int i = 0; i < X; i ++) add(ans, dp[n][i]);
    if (X&1) {
        int K = X;
        for (int i = K; i <= n; i ++) add(ans, C(n, i));
    }
    for (int l = 0; l <= n-2; l ++) {
        for (int s = 0; s <= X-3; s ++) {
            int sum = X-3-s;
            if (sum&1) continue;
            int d = sum>>1;
            add(ans, 1ll * dp[l][s] * ap[n-l-2][d][0] % mod);
        }
    }
    printf("%d\n", ans);
    return 0;
}
