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>

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.
*/
