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 <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <stack>
#include <queue>
#include <set>
#include <map>
using namespace std;
#define MOD 998244353
#define ADD(X,Y) ((X) = ((X) + (Y)%MOD) % MOD)
typedef long long i64; typedef vector<int> ivec; typedef vector<string> svec;

int N, X;

int dpa[3030][6060]; // len, sum
i64 dpb[3030][3030]; // two lines; allowed max 2s, sum of # of 0 and 2
int comb[3030][3030]; // C(i,j)
int combacc[3030][3030];
int combacc2[3030][3030];

i64 cumu[3030];

int main()
{
	scanf("%d%d", &N, &X);

	comb[0][0] = 1;
	for (int i = 1; i <= N; ++i) {
		comb[i][0] = 1;
		for (int j = 1; j <= N; ++j) comb[i][j] = (comb[i - 1][j - 1] + comb[i - 1][j]) % MOD;
	}
	for (int i = 0; i <= N; ++i) {
		combacc[i][0] = comb[i][0];
		for (int j = 1; j <= N; ++j) {
			combacc[i][j] = (combacc[i][j - 1] + comb[i][j]) % MOD;
		}
	}
	for (int j = 0; j <= N; ++j) combacc2[0][j] = combacc[0][j];
	for (int i = 1; i <= N; ++i) {
		for (int j = 0; j <= N; ++j) {
			combacc2[i][j] = (combacc2[i - 1][j] + combacc[i][j]) % MOD;
		}
	}
	/*
	for (int i = 1; i <= N; ++i) {
		for (int j = 0; j <= N; ++j) {
			ADD(combacc[i][j], combacc[i - 1][j]);
		}
	}
	*/

	dpa[0][0] = 1;
	for (int i = 0; i <= N; ++i) {
		for (int j = 0; j <= 2 * i; ++j) {
			for (int k = 0; k <= 2; ++k) ADD(dpa[i + 1][j + k], dpa[i][j]);
		}
	}

	for (int i = 0; i <= N; ++i) {
		dpb[0][i] = i + 1;
	}
	for (int i = 1; i <= N; ++i) {
		for (int j = 0; j <= N; ++j) cumu[j] = dpb[i - 1][j];
		for (int j = 1; j <= N; ++j) ADD(cumu[j], cumu[j - 1]);
		for (int j = 1; j <= N; ++j) ADD(cumu[j], cumu[j - 1]);

		for (int j = 0; j <= N; ++j) {
			// both contains 2
			if (j >= 2) ADD(dpb[i][j], cumu[j - 2]);

			// only one contains 2
			ADD(dpb[i][j], combacc2[j][i] * 2);

			// correction (no 2)
			ADD(dpb[i][j], MOD - (j + 1));
		}
		//for (int j = 0; j <= N; ++j) printf("%d %d: %lld\n", i, j, dpb[i][j]);
	}

	i64 ret = 0;
	for (int s = 0; s <= 2 * N; ++s) {
		// ... 1 s 1 ...
		for (int l = 2; l <= N; ++l) {
			if (s % 2 == X % 2) {
				int maxp = (X - s - 2) / 2 - 1;
				if (maxp >= 0) ADD(ret, (i64)dpa[l - 2][s] * combacc[N - l][maxp] % MOD * (N - l + 1));
				//printf("%d %d: %d %lld\n", s, l, maxp, (i64)dpa[l - 2][s] * combacc[N - l][maxp] % MOD * (N - l + 1));
			} else {
				int maxp = (X - s - 3) / 2;
				if (maxp >= 0) ADD(ret, (i64)dpa[l - 2][s] * dpb[maxp][N - l]);
				//printf("%d %d: %lld\n", s, l, (i64)dpa[l - 2][s] * dpb[maxp][N - l]);
			}
			//printf("%d %d %lld\n", s, l, ret);
		}
	}
	//printf("%lld\n", ret);

	// ... 1 ...
	if (X % 2 == 1) {
		int maxp = (X - 1) / 2 - 1;
		for (int i = 0; i <= maxp; ++i) ADD(ret, (i64)comb[N - 1][i] * N);
		//if (maxp >= 0) ADD(ret, (i64)combacc[N - 1][maxp] * N);
	} else {
		int maxp = (X - 2) / 2;
		if (maxp >= 0) ADD(ret, (i64)dpb[maxp][N - 1]);
	}
	//printf("%lld\n", ret);

	// ...
	int yt;
	if (X % 2 == 1) yt = N;
	else yt = X / 2 - 1;

	for (int i = 0; i <= yt; ++i) ADD(ret, comb[N][i]);

	printf("%lld\n", ret);

	return 0;
}
