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 <algorithm>
#include <vector>
#include <cstring>
#include <queue>
#include <string>
#include <set>
#include <map>
#include <functional>
#include <cmath>
#include <cassert>
#define SIZE 3005
#define MX 6005
#define MOD 998244353

using namespace std;
typedef long long int ll;
typedef pair <int,int> P;

ll inv[SIZE],fac[SIZE],finv[SIZE];
void make()
{
	fac[0]=fac[1]=1;
	finv[0]=finv[1]=1;
	inv[1]=1;
	for(int i=2;i<SIZE;i++)
	{
		inv[i]=MOD-inv[MOD%i]*(MOD/i)%MOD;
		fac[i]=fac[i-1]*(ll) i%MOD;
		finv[i]=finv[i-1]*inv[i]%MOD;
	}
}
ll C(int a,int b)
{
	if(a<b) return 0;
	return fac[a]*(finv[b]*finv[a-b]%MOD)%MOD;
}
ll dp[SIZE][MX];
ll dp2[SIZE][SIZE];
ll dp3[SIZE][SIZE];
ll rdp[SIZE][SIZE];

int main()
{
	make();
	int n,X;
	scanf("%d %d",&n,&X);
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<X;j++)
		{
			if(i==0)
			{
				if(j==0) dp[i][j]=1;
			}
			else
			{
				dp[i][j]=0;
				//dp[i][j]=dp[i-1][j];
				if(j>0) dp[i][j]+=dp[i-1][j-1];
				if(j>1) dp[i][j]+=dp[i-1][j-2];
				if(dp[i][j]>=MOD) dp[i][j]-=MOD;
			}
		}
	}
	ll ret=0;
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<X;j++)
		{
			int sum=j,len=i;
			len+=2;
			sum+=2;
			if(len<=n&&sum<X)
			{
				if(sum%2!=X%2)
				{
					int lim=(X-sum)/2;
					dp2[len][lim]+=dp[i][j];
					if(dp2[len][lim]>MOD) dp2[len][lim]-=MOD;
					//if(dp[i][j]>0) printf("%d %d : %d\n",len,lim,dp[i][j]);
				}
				else
				{
					int lim=(X-sum)/2-1;
					dp3[len][lim]+=dp[i][j];
					if(dp3[len][lim]>MOD) dp3[len][lim]-=MOD;
					//if(dp[i][j]>0) printf("%d %d : %d\n",len,lim,dp[i][j]);
				}
			}
			if(i==0)
			{
				len=1,sum=1;
				if(len<=n&&sum<X)
				{
					if(sum%2!=X%2)
					{
						int lim=(X-sum)/2;
						dp2[len][lim]+=dp[i][j];
						if(dp2[len][lim]>MOD) dp2[len][lim]-=MOD;
					}
					else
					{
						int lim=(X-sum)/2-1;
						dp3[len][lim]+=dp[i][j];
						if(dp3[len][lim]>MOD) dp3[len][lim]-=MOD;
					}
				}
			}
		}
	}
	for(int i=0;i<=n;i++)
	{
		for(int j=0;j<=n;j++)
		{
			rdp[i][j]=dp2[i][j];
			if(i>0&&j+1<=n)
			{
				rdp[i][j]+=rdp[i-1][j+1];
				if(rdp[i][j]>=MOD) rdp[i][j]-=MOD;
			}
		}
	}
	for(int i=0;i<=n;i++)
	{
		for(int j=0;j<=n;j++)
		{
			dp2[i][j]=rdp[i][j]*2%MOD-dp2[i][j];
			if(dp2[i][j]<0) dp2[i][j]+=MOD;
		}
	}
	for(int i=2;i<=n;i++)
	{
		for(int j=0;j+1<=n;j++)
		{
			dp2[i][j]+=dp2[i-2][j+1];
			if(dp2[i][j]>=MOD) dp2[i][j]-=MOD;
		}
	}
	for(int i=0;i<=n;i++)
	{
		ll sum=0;
		for(int j=0;j<=n;j++)
		{
			sum+=dp2[i][j];
			if(sum>=MOD) sum-=MOD;
		}
		ret+=C(n,i)*sum%MOD;
		if(ret>=MOD) ret-=MOD;
	}
	//printf("* %lld\n",ret);
	for(int i=0;i<=n;i++)
	{
		for(int j=0;j<=n;j++)
		{
			rdp[i][j]=dp3[i][j];
			if(i>0&&j+1<=n)
			{
				rdp[i][j]+=rdp[i-1][j+1];
				if(rdp[i][j]>=MOD) rdp[i][j]-=MOD;
			}
		}
	}
	for(int i=0;i<=n;i++)
	{
		for(int j=0;j<=n;j++)
		{
			dp3[i][j]=rdp[i][j];
		}
	}
	for(int i=1;i<=n;i++)
	{
		for(int j=0;j+1<=n;j++)
		{
			dp3[i][j]+=dp3[i-1][j+1];
			if(dp3[i][j]>=MOD) dp3[i][j]-=MOD;
		}
	}
	for(int i=0;i<=n;i++)
	{
		ll sum=0;
		for(int j=0;j<=n;j++)
		{
			sum+=dp3[i][j];
			if(sum>=MOD) sum-=MOD;
		}
		ret+=C(n,i)*sum%MOD;
		if(ret>=MOD) ret-=MOD;
	}
	//printf("* %lld\n",ret);
	if(X%2==1)
	{
		ll all=1;
		for(int i=0;i<n;i++) all=all*2LL%MOD;
		ret+=all;
		if(ret>=MOD) ret-=MOD;
	}
	else
	{
		for(int i=0;i<=n;i++)
		{
			if(i*2>=X) break;
			ret+=C(n,i);
			if(ret>=MOD) ret-=MOD;
		}
	}
	printf("%lld\n",ret);
	return 0;
}
