// Original C++ solution (slower):
const long long MOD = 998244353;

const int N = 3004;



#include <iostream>

#include <vector>

#include <string>

#include <map>

#include <set>

#include <algorithm>

#include <cmath>

#include <time.h>

#include <unordered_set>

#include <bitset>

#include <deque>



using namespace std;



#define int long long

typedef long long ll;

typedef pair<int, int> pii;

typedef pair<ll, ll> pll;

typedef vector<ll> vi;



#define forn(i, n) for (int (i) = 0; (i) != (n); (i)++)

#define all(v) (v).begin(), (v).end()

#define rall(v) (v).rbegin(), (v).rend()

#define popcount(x) __builtin_popcount(x)

#define popcountll(x) __builtin_popcountll(x)

#define fi first

#define se second

#define re return

#define uniq(x) sort(all(x)); (x).resize(unique(all(x)) - (x).begin())



#ifdef LOCAL

#define dbg(x) cerr << __LINE__ << " " << #x << " " << x << endl

#define ln cerr << __LINE__ << endl

#else

#define dbg(x) void(0)

#define ln void(0)

#endif // LOCAL



int cx[4] = {-1, 0, 1, 0};

int cy[4] = {0, -1, 0, 1};



ll inq(ll x, ll y)

{

    if (!y) re 1 % MOD;

    ll l = inq(x, y / 2);

    if (y % 2) re l * l % MOD * x % MOD;

    re l * l % MOD;

}



ll rev(ll x)

{

    return inq(x, MOD - 2);

}



bool __precomputed_combinatorics = 0;

vector<ll> __fact, __ufact, __rev;



void __precompute_combinatorics()

{

    __precomputed_combinatorics = 1;

    __fact.resize(N);

    __ufact.resize(N);

    __rev.resize(N);

    __rev[1] = 1;

    for (int i = 2; i < N; i++) __rev[i] = MOD - __rev[MOD % i] * (MOD / i) % MOD;

    __fact[0] = 1, __ufact[0] = 1;

    for (int i = 1; i < N; i++) __fact[i] = __fact[i - 1] * i % MOD, __ufact[i] = __ufact[i - 1] * __rev[i] % MOD;

}



ll fact(int x)

{

    if (!__precomputed_combinatorics) __precompute_combinatorics();

    return __fact[x];

}



ll cnk(int n, int k)

{

    if (k < 0 || k > n) return 0;

    if (!__precomputed_combinatorics) __precompute_combinatorics();

    return __fact[n] * __ufact[n - k] % MOD * __ufact[k] % MOD;

}



int n, x;



signed main()

{

    ios_base::sync_with_stdio(false);

    cin.tie(0);

    cout.tie(0);



    cin >> n >> x;

    vector<ll> calc(n + 1);

    calc[0] = 1;

    for (int len = 1; len <= n; len++)

    {

        for (int summ = len; summ <= 2 * len; summ++)

        {

            if (summ < x)

            {

                calc[len] = (calc[len] + cnk(len, summ - len)) % MOD;

            }

            else

            {

                if (summ <= x || (summ - x + 1) % 2 == 1)

                {

                    continue;

                }

                int L = (summ - x + 1) / 2;

                int R = len - L;

                int summa = summ - 4 * L;

                if (summa + 2 * L != x - 1) cout << "My bad\n", exit(0);

                int dlina = len - 2 * L;

                //cout << len << " " << summ << " " << L << " " << dlina << endl;

                if (summa != 2 * dlina) calc[len] = (calc[len] + cnk(dlina, summa - dlina)) % MOD;

            }

        }

        if (2 * len >= x && x % 2 == 1) calc[len] = (calc[len] + 1) % MOD;

        //cout << len << " " << calc[len] << endl << endl;

    }

    ll ans = 0;

    for (int i = 0; i <= n; i++)

    {

        ans = (ans + calc[i] * cnk(n, i)) % MOD;

    }

    cout << ans;

}



/* Note:

Check constants at the beginning of the code.

    N is set to 4e5 but be careful in problems with large constant factor.

    Setting N in every problem is more effective.

Check corner cases.

    N = 1

No def int long long for now.

Add something here.

*/


// Optimized solution to the same problem (faster):
#include <iostream>



const int MOD = 998244353;

const int N = 3004;



int n, x;

int calc[N];

int cnk[N][N];



signed main()

{

    std::cin >> n >> x;

    calc[0] = 1;

    for (int i = 0; i <= n; i++)

    {

        cnk[i][0] = 1, cnk[i][i] = 1;

        for (int j = 1; j < i; j++)

        {

            cnk[i][j] = (cnk[i - 1][j - 1] + cnk[i - 1][j] >= MOD) ? cnk[i - 1][j - 1] + cnk[i - 1][j] - MOD : cnk[i - 1][j - 1] + cnk[i - 1][j];

        }

    }

    for (int len = 1; len <= n; len++)

    {

        for (int summ = len; summ <= 2 * len; summ++)

        {

            if (summ < x)

            {

                if (summ - len >= 0) calc[len] = calc[len] + cnk[len][summ - len];

                if (calc[len] >= MOD) calc[len] -= MOD;

            }

            else

            {

                if (summ <= x || (summ - x + 1) % 2 == 1)

                {

                    continue;

                }

                int L = (summ - x + 1) / 2;

                int summa = summ - 4 * L;

                int dlina = len - 2 * L;

                if (summa != 2 * dlina)

                {

                    if (summa - dlina >= 0) calc[len] = calc[len] + cnk[dlina][summa - dlina];

                    if (calc[len] >= MOD) calc[len] -= MOD;

                }

            }

        }

        if (2 * len >= x && x % 2 == 1) calc[len]++;

    }

    int ans = 0;

    for (int i = 0; i <= n; i++)

    {

        ans = (ans + 1ll * calc[i] * cnk[n][i]) % MOD;

    }

    std::cout << ans;

}



/* Note:

Check constants at the beginning of the code.

    N is set to 4e5 but be careful in problems with large constant factor.

    Setting N in every problem is more effective.

Check corner cases.

    N = 1

No def int long long for now.

Add something here.

*/


// Fastest known solution for this problem: