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 <cstring>
#include <algorithm>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <cstdlib>
#include <ctime>
#include <string>
#include <iostream>
#include <bitset>
#define PII pair <int, int>
#define PPI pair <PII, int>
#define x first
#define y second
#define P 998244353

using namespace std;

typedef long long ll;

int N, X;

int F[2][6010][2][3], G[3010][6010], C[6010][6010];

void add(int &x, int y) {
    x = (x + y) % P;
}
int main() {
    scanf("%d%d", &N, &X);
    G[0][0] = 1;
    int ans = 0;
    for(int i = 0; i < N; i++)
        for(int j = 0; j < X; j++) {
            add(G[i + 1][j], G[i][j]);
            add(G[i + 1][j + 1], G[i][j]);
            add(G[i + 1][j + 2], G[i][j]);
        }
    if(X % 2 == 1) {
        for(int i = 0; i <= N; i++)
            for(int j = 0; j <= i; j++)
                C[i][j] = !j ? 1 : (C[i - 1][j - 1] + C[i - 1][j]) % P;
        for(int i = X; i <= N; i++)
            add(ans, C[N][i]);
    }
    for(int i = 0; i < X; i++) add(ans, G[N][i]);
    int a = 0, b = 1;
    memset(F, 0, sizeof F);
    F[a][0][0][1] = 1;
    for(int i = 0; i < N - 1; i++, swap(a, b)) {
        memset(F[b], 0, sizeof F[b]);
        for(int o = 0; o < X; o++)
            for(int s = 0; s < 2; s++)
                for(int k = 1; k < 3; k++)
                    for(int l = 0; l + k < 3; l++) {
                        add(F[b][o + l][s][k + l], F[a][o][s][k]);
                        if(l) add(F[b][o + l][!s][l], F[a][o][s][k]);
                    }
        for(int o = 1; o < X; o++)
            for(int k = 1; k < 3; k++)
                for(int l = 1; l + k < 3; l++)
                    add(ans, 1LL * F[b][o][1][k] * G[N - i - 2][X - 1 - o - l] % P);
    }
    printf("%d\n", (ans % P + P) % P);
    return 0;
}