#define y1 askjdkasldjlkasd
#include <bits/stdc++.h>
#undef y1

using namespace std;

#define pb push_back
#define mp make_pair
#define fi(a, b) for(int i=a; i<=b; i++)
#define fj(a, b) for(int j=a; j<=b; j++)
#define fo(a, b) for(int o=a; o<=b; o++)
#define fdi(a, b) for(int i=a; i>=b; i--)
#define fdj(a, b) for(int j=a; j>=b; j--)
#define fdo(a, b) for(int o=a; o>=b; o--)
#define sz(x) (int)x.size()

typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef vector<pii> vpii;
typedef pair<ll, ll> pll;
typedef vector<pll> vpll;
typedef vector<ll> vll;

#ifdef LOCAL
#define err(...) fprintf(stderr, __VA_ARGS__)
#else
#define err(...) while (0)
#endif

double START_TIME;

void exit() {
#ifdef LOCAL	
	cerr << "TIME: " << setprecision(5) << fixed << (clock() - START_TIME) / CLOCKS_PER_SEC << endl;
#endif	
	exit(0);
}

template<typename A, typename B>
ostream& operator<<(ostream& os, pair<A, B> p) {
	os << "(" << p.first << ", " << p.second << ")";
	return os;
}

template<typename T>
ostream& operator<<(ostream& os, vector<T> v) {
	fi(0, sz(v) - 1) {
		os << v[i] << " ";
	}
	return os;
}

template<typename T>
ostream& operator<<(ostream& os, set<T> t) {
	for (auto z : t) {
		os << z << " ";
	}
	return os;
}

template<typename T1, typename T2>
ostream& operator<<(ostream& os, map<T1, T2> t) {
	cerr << endl;
	for (auto z : t) {
		os << "\t" << z.first << " -> " << z.second << endl;
	}
	return os;
}

#ifdef LOCAL
#define dbg(x) {cerr << __LINE__ << "\t" << #x << ": " << x << endl;}
#define dbg0(x, n) {cerr << __LINE__ << "\t" << #x << ": "; for (int ABC = 0; ABC < n; ABC++) cerr << x[ABC] << ' '; cerr << endl;}
#else
#define dbg(x) while(0){}
#define dbg0(x, n) while(0){}
#endif

#ifdef LOCAL
#define ass(x) if (!(x)) { cerr << __LINE__ << "\tassertion failed: " << #x << endl, abort(); }
#else
#define ass(x) assert(x)
#endif

///////////////////////////////////////////////////

const int MAX = 2e6 + 41;
const int MOD = 998244353;

int add(int a, int b) {
	a += b;
	if (a >= MOD) a -= MOD;
	return a;
}

int sub(int a, int b) {
	a -= b;
	if (a < 0) a += MOD;
	return a;
}

int mul(int a, int b) {
	return (ll) a * b % MOD;
}

int bp(int x, int d) {
	int res = 1;
	while (d) {
		if (d & 1) res = mul(res, x);
		x = mul(x, x);
		 d >>= 1;
	}
	return res;
}

int inv(int x) {
	return bp(x, MOD - 2);
}

int f[MAX];
int invf[MAX];

void init() {
	f[0] = 1;
	fi(1, MAX - 1) {
		f[i] = mul(f[i - 1], i);
	}
	fi(0, MAX - 1) invf[i] = inv(f[i]);
}

int getc(int n, int k) {
	if (n == k) return 1;
	if (n < k) return 0;
	return mul(f[n], mul(invf[k], invf[n - k]));
}

int n, m;

int calc(int z, int o, int q) {
	int res = 0;
	int v1 = 0, v2 = 0, v3 = 0;
	{//all
		v1 = getc(z + o - 1 + q, z + o - 1);
	}
	{//bz
		int v21 = z;
		int qq = q - (m + 1);
		if (qq >= 0) {
			int v22 = getc(z + o - 1 + qq, z + o - 1);
			v2 = mul(v21, v22);
/*
			err("bz v22 = %d qq = %d\n", v22, qq);
*/
		}
	}
	{//bo
		int v31 = o;
		int qq = q - m;
		if (qq >= 0) {
			int v32 = getc(z + o - 1 + qq, z + o - 1);
			v3 = mul(v31, v32);
/*
			err("bo v32 = %d qq = %d\n", v32, qq);
*/
		}
	}
/*
	err("v1 = %d v2 = %d v3 = %d\n", v1, v2, v3);
*/
	res = add(res, v1);
	res = sub(res, v2);
	res = sub(res, v3);
	return res;
}

void solve () {
	int ans = 0;
	fo(0, m) {
		int rem = m * 3 - o;
		if (rem % 2 == 1) continue;
		int v1 = getc(n, o);
		int q2 = m + (m - o) / 2;
		int v2 = calc(n - o, o, q2);
		int v = mul(v1, v2);
/*
		err("o = %d v1 = %d v2 = %d q2 = %d\n\n", o, v1, v2, q2);
*/
		ans = add(ans, v);
	}
	printf("%d\n", ans);
}

int main() {
#ifdef LOCAL
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
	START_TIME = (double)clock();
#endif

	init();	
	scanf("%d %d", &n, &m);
	solve();

	exit();
	return 0;
}





Measured memory_bytes: 15872