#include<bits/stdc++.h>
using namespace std;
#define int long long 

#define deb(...) cerr << "[" << #__VA_ARGS__ << "] : [", DBG(__VA_ARGS__)
void DBG() { cerr << "]\n";}
template<typename T, typename ...Args> void DBG(T first, Args... args)
{cerr << first; if(sizeof...(args))cerr<<", "; DBG(args...); }

void solve(){
  int n,k; cin >> n >> k;
  int cnt=0;
  for(int i=2;i<=2*n;i++){
    int num=k+i;
    if(num>2*n||num<=1)continue;
    if(num%2==0&&i%2){
      int m=min(num,n);
      int combs=(m-(m==num?1:0)-(num)/2)*2+1;
      int m2=min(n,i);
      int combs2=(m2-(m2==i?1:0)-(i-1)/2)*2;
      cnt+=combs*combs2;
    }
    else if(num%2==0&&i%2==0){
      int m=min(num,n);
      int combs=(m-(m==num?1:0)-(num)/2)*2+1;
      int m2=min(n,i);
      int combs2=(m2-(m2==i?1:0)-i/2)*2+1;
      cnt+=combs*combs2;
    }
    else if(num%2&&i%2){
      int m=min(num,n);
      int combs=(m+(m==num?-1:0)-(num-1)/2)*2;
      int m2=min(n,i);
      int combs2=(m2-(m2==i?1:0)-(i-1)/2)*2;
      cnt+=combs*combs2;
    }
    else if(num%2&&i%2==0){
      int m=min(num,n);
      int combs=(m+(m==num?-1:0)-(num-1)/2)*2;
      int m2=min(n,i);
      int combs2=(m2+(m2==i?-1:0)-i/2)*2+1;
      cnt+=combs*combs2;
    }
  }
  cout << cnt << endl;
}

int32_t main(){
  ios_base:: sync_with_stdio(false);
  cin.tie(0);
  int t=1;
  for(int tt=1;tt<=t;tt++){
    solve();
  }
}



#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <set>
#include <map>
#include <queue>
#include <random>
#include <chrono>
#include <tuple>
#include <random>
#include <cmath>

using namespace std;

typedef long long ll;
typedef long double ld;
#define fastInp cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0);
const ll SZ = 3100, INF = 1e9;

template<int MOD>
struct Mint {
	int val;

	Mint() : val(0) {}
	Mint(int x) : val(x) {}
	Mint(long long x) : val((x % MOD + MOD) % MOD) {}

	Mint<MOD> operator + (Mint<MOD> a) const {
		int x = val + a.val;
		return Mint<MOD>(x - MOD * (x >= MOD));
	}

	Mint<MOD> operator - (Mint<MOD> a) const {
		int x = val - a.val;
		return Mint<MOD>(x + MOD * (x < 0));
	}

	Mint<MOD> operator * (Mint<MOD> a) const {
		return Mint<MOD>((long long)val * a.val % MOD);
	}

	static Mint<MOD> power(Mint<MOD> a, long long b) {
		if (b == 0) return Mint<MOD>(1);
		if (b % 2) return a * power(a, b - 1);
		return power(a * a, b / 2);
	}

	Mint<MOD> rev() const {
		return power(*this, MOD - 2);
	}

	Mint<MOD> operator / (Mint<MOD> a) const {
		return Mint<MOD>((long long)val * a.rev().val % MOD);
	}

	Mint<MOD>& operator += (Mint<MOD> a) {
		return *this = *this + a;
	}

	Mint<MOD>& operator -= (Mint<MOD> a) {
		return *this = *this - a;
	}

	Mint<MOD>& operator *= (Mint<MOD> a) {
		return *this = *this * a;
	}

	Mint<MOD>& operator /= (Mint<MOD> a) {
		return *this = *this / a;
	}

	Mint<MOD>& operator = (long long x) {
		return *this = Mint<MOD>(x);
	}

	friend istream& operator >> (istream &in, Mint<MOD> &x) {
		long long val;
		in >> val;
		x = Mint<MOD>(val);
		return in;
	}

	friend ostream& operator << (ostream &out, Mint<MOD> x) {
		return out << x.val;
	}
};

constexpr int MOD = 998244353;
using mint = Mint<MOD>;

ll n, k;

mint dp[SZ + 3][SZ + 3], ones[SZ + 3][2];

int main() {
	fastInp;

	cin >> n >> k;

	dp[0][0] = 1;

	for (int i = 0; i <= SZ; i++) {
		for (int j = SZ; j >= 0; j--) {
			if (i > 0 && j > 0) dp[i][j] += dp[i - 1][j - 1];
			if (j != 0 && 2 * j < SZ) dp[i][j] += dp[i][2 * j];
		}
	}

	cout << dp[n][k];

	return 0;
}