#include <bits/stdc++.h>
using namespace std;
typedef long long ll;



const int mod = 998244353;
struct Mod {
public:
	int num;
	Mod() : Mod(0) { ; }
	Mod(long long int n) : num((n % mod + mod) % mod) {
		static_assert(mod<INT_MAX / 2, "mod is too big, please make num 'long long int' from 'int'");
	}
	Mod(int n) : Mod(static_cast<long long int>(n)) { ; }
	operator int() { return num; }
};

Mod operator+(const Mod a, const Mod b) { return Mod((a.num + b.num) % mod); }
Mod operator+(const long long int a, const Mod b) { return Mod(a) + b; }
Mod operator+(const Mod a, const long long int  b) { return b + a; }
Mod operator++(Mod &a) { return a + Mod(1); }
Mod operator-(const Mod a, const Mod b) { return Mod((mod + a.num - b.num) % mod); }
Mod operator-(const long long int a, const Mod b) { return Mod(a) - b; }
Mod operator--(Mod &a) { return a - Mod(1); }
Mod operator*(const Mod a, const Mod b) { return Mod(((long long)a.num * b.num) % mod); }
Mod operator*(const long long int a, const Mod b) { return Mod(a)*b; }
Mod operator*(const Mod a, const long long int b) { return Mod(b)*a; }
Mod operator*(const Mod a, const int b) { return Mod(b)*a; }
Mod operator+=(Mod &a, const Mod b) { return a = a + b; }
Mod operator+=(long long int &a, const Mod b) { return a = a + b; }
Mod operator-=(Mod &a, const Mod b) { return a = a - b; }
Mod operator-=(long long int &a, const Mod b) { return a = a - b; }
Mod operator*=(Mod &a, const Mod b) { return a = a * b; }
Mod operator*=(long long int &a, const Mod b) { return a = a * b; }
Mod operator*=(Mod& a, const long long int &b) { return a = a * b; }
Mod operator^(const Mod a, const int n) {
	if (n == 0) return Mod(1);
	Mod res = (a * a) ^ (n / 2);
	if (n % 2) res = res * a;
	return res;
}
Mod mod_pow(const Mod a, const int n) {
	if (n == 0) return Mod(1);
	Mod res = mod_pow((a * a), (n / 2));
	if (n % 2) res = res * a;
	return res;
}
Mod inv(const Mod a) { return a ^ (mod - 2); }
Mod operator/(const Mod a, const Mod b) {
	assert(b.num != 0);
	return a * inv(b);
}
Mod operator/(const long long int a, const Mod b) {
	return Mod(a) / b;
}
Mod operator/=(Mod &a, const Mod b) {
	return a = a / b;
}

#define MAX_MOD_N 2540000

Mod fact[MAX_MOD_N], factinv[MAX_MOD_N];
void init(const int amax = MAX_MOD_N) {
	fact[0] = Mod(1); factinv[0] = 1;
	for (int i = 0; i < amax - 1; ++i) {
		fact[i + 1] = fact[i] * Mod(i + 1);
		factinv[i + 1] = factinv[i] / Mod(i + 1);
	}
}
Mod comb(const int a, const int b) {
	return fact[a] * factinv[b] * factinv[a - b];
}
// int solve(){
// 	int N;cin>>N;
// 	long long int K;cin>>K;
// 	vector<int>v;
// 	for(int i=0;i<N;++i){
// 		int a;cin>>a;
// 		v.push_back(a);
// 	}
// 	map<int,int>mp;
// 	for(int i=N-1;i>=0;--i){
// 		mp[v[i]]=N+i;
// 	}
// 	vector<int>rs(N);
// 	for(int i=N-1;i>=0;--i){
// 		rs[i]=mp[v[i]];
// 		mp[v[i]]=i;
// 	}

// 	long long int ny=0,nx=0;
// 	while(true){
// 		auto next_x=rs[nx];
// 		long long next_y=ny;
// 		if(next_x>=N){
// 			next_y++;
// 			next_x-=N;
// 		}
// 	}
// }
int main() {
	int N;cin>>N;
	int M;cin>>M;
	Mod answer;
	init();
	answer=comb(N+3*M-1,N-1);

	{
		for(int max_num=2*M+1;max_num<=3*M;++max_num){
			Mod cnt=N;
			cnt*=comb(N-2+(3*M-max_num),N-2);
			answer-=cnt;
		}
		//cout<<answer.num<<endl;
		for(int odd_num=M+1;odd_num<=min(3*M,N);++odd_num){
			if(odd_num%2!=M%2)continue;
			Mod place_cnt=comb(N,odd_num);
			int rest=3*M-odd_num;
			assert(rest%2==0);
			Mod acnt=comb(N-1+rest/2,N-1);
			answer-=place_cnt*acnt;
		}
	}
	cout<<answer.num<<endl;

	return 0;
}	

Measured memory_bytes: 20096