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 <iostream>
#include <algorithm>
using namespace std;

long long mod = 998244353;
long long dp[3009][6009];
long long nr[3009][3009];

void init() {
	for (int i = 0; i <= 3000; i++) {
		for (int j = 0; j <= 3000; j++) {
			if (i == 0 || j == 0) nr[i][j] = 1;
			else nr[i][j] = (nr[i - 1][j] + nr[i][j - 1]) % mod;
		}
	}
	dp[0][0] = 1;
	for (int i = 0; i <= 3000; i++) {
		for (int j = 0; j <= 6000; j++) {
			dp[i + 1][j + 0] += dp[i][j]; dp[i + 1][j + 0] %= mod;
			dp[i + 1][j + 1] += dp[i][j]; dp[i + 1][j + 1] %= mod;
			dp[i + 1][j + 2] += dp[i][j]; dp[i + 1][j + 2] %= mod;
		}
	}
}

long long ncr(int a, int b) {
	if (a < b || b < 0) return 0;
	return nr[a - b][b];
}

long long solve(int N, int X) {
	// パターン A : 合計が X 以下の場合
	long long sum1 = 0;
	for (int i = 0; i < X; i++) { sum1 += dp[N][i]; sum1 %= mod; }

	// パターン B : 合計が X 以上の場合
	long long sum2 = 0;
	for (int i = 0; i <= N; i++) {
		for (int j = 1; j <= N - i; j++) {
			// i : 2 の個数, j : 1 の個数
			if (j >= X || i * 2 + j < X) continue;
			if ((i * 2 + j) % 2 == X % 2) continue;
			long long d = i - (1LL * ((X - 1) - j) / 2); // 左右に入るべき最小の数
			long long val = ncr(j + i - 2 * d, j);
			long long cost = ncr(N, i + j);
			//cout << "(i, j) = (" << i << ", " << j << ") -> val = " << val << ", cost = " << cost << ", mul = " << val * cost << endl;
			sum2 += val * cost;
			sum2 %= mod;
		}
	}

	// パターン C : 合計が X 以上の場合（全て 0 か 2）
	long long sum3 = 0;
	if (X % 2 == 1) {
		for (int i = 0; i <= N; i++) {
			// i : 2 の個数
			if (i * 2 < X) continue;
			long long cost = ncr(N, i);
			sum3 += cost;
			sum3 %= mod;
		}
	}
	return (sum1 + sum2 + sum3) % mod;
}

int main() {
	init();
	long long N, X; cin >> N >> X;
	cout << solve(N, X) << endl;
	return 0;
}