#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int mod=998244353;
inline int add(int a,int b){a+=b;return a>=mod?a-mod:a;}
inline int sub(int a,int b){a-=b;return a<0?a+mod:a;}
inline int mul(int a,int b){return (ll)a*b%mod;}
inline int qpow(int a,int b){int ret=1;for(;b;b>>=1,a=mul(a,a))if(b&1)ret=mul(ret,a);return ret;}
/* math */
const int N = 4e6+5;
int fac[N],ifac[N];
inline void init(int n=4e6){
	fac[0]=ifac[0]=1;for(int i=1;i<=n;i++)fac[i]=mul(fac[i-1],i);
	ifac[n]=qpow(fac[n],mod-2);for(int i=n-1;i;i--)ifac[i]=mul(i+1,ifac[i+1]);
}
inline int binom(int a,int b){
	if(b>a)return 0;
	return mul(fac[a],mul(ifac[b],ifac[a-b]));
}
int n,m;

int main()
{
	init();
	cin >> n >> m;
	int dec1=mul(n, binom(m-1+n-1,n-1));
	int dec2=0;
	for(int d=0;d<=min(n,m);d++)if((m*3-d)%2==0){
		int w=binom(n,d);
		int d2=mul(w, binom((m*3-d)/2+n-1,n-1));
		// cout << " " << (m*3-d)/2 << endl;
		// cout << d << " " << w << " " << binom((m*3-d)/2+n-1,n-1) << endl;
		dec2=add(dec2,d2);
	}
	// cout << dec1 << " " << dec2 << endl;
	cout << sub(dec2,dec1) << endl;
}