

#include <bits/stdc++.h>
#include <iostream>
#include <limits>
#include <numeric>
#include <type_traits>
#include <bitset>

using namespace std;

#define rep(i,n,m) for(ll (i)=(n);(i)<(m);(i)++)
#define rrep(i,n,m) for(ll (i)=(n);(i)>(m);(i)--)
using ll = long long;
const ll mod = 998244353;

void bitadd(ll a,ll w, vector<ll>& bit){

    a += 1;
    ll x = a;
    if (a == 0){
        exit(1);
    }
    while (x <= (bit.size()-1)){
        bit[x] = (bit[x] + w) % mod;
        x += (x & (-x));
    }

    return;
}

ll bitsum(ll a,vector<ll>& bit){

    a += 1;
    ll ret = 0;
    ll x = a;
    if (a == 0){
        exit(1);
    }
    while (x > 0){
        ret = (ret + bit[x]) % mod;
        x -= (x & (-x));
    }

    return ret;
}

int main(){

    ll N,K;
    cin >> N >> K;

    vector<vector<ll>> dp(N-K+5,vector<ll> (2*(N-K+5)));
    bitadd(min(2*(N-K+3),K), 1 ,dp[0]);

    rep(i,1,N-K+1){

        rep(j,0,i){
            ll now = ((bitsum(2*(N-K+3),dp[j]) - bitsum((i-j-1),dp[j])) + mod) % mod;
            bitadd(min((i-j)*2,2*(N-K+3)) , now , dp[i]);
        }
    }

    cout << (bitsum(2*(N-K+3),dp[N-K]) % mod) << endl;

}
#include <iostream>

const int M = 998244353;

int dp[3005][3005];

int main()
{
	int n, m, i, j, k;
	while (scanf("%d%d", &n, &m) == 2)
	{
		// dp[i][j] different ways of collecting total value j with i things
		// dp[i][j] = dp[i][j*2] + dp[i-1][j*2-1*2] + ... + dp[0][j*2-i*2]
		dp[0][0] = 1;
		for (i=1; i<=n; i++)
		{
			dp[i][0] = 0;
			for (j=i; j>=1; j--)
			{
				// i-k >= 2j-2k
				// => k >= 2j-i
				k = j+j - i;
				if (k < 0)
				{
					k = 0;
				}
				dp[i][j] = dp[i-k][j+j-k-k];
				if (j-2 >= 0)
				{
					dp[i][j] = (dp[i][j] + dp[i-1][j-2]) % M;
				}
			}
		}
		printf("%d\n", (dp[n][m]+M-dp[n-1][m-2])%M);
	}
	return 0;
}