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

#define     fast()              ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); 
#define     ll                  long long int
#define     test()              ll t; cin>>t; while(t--) 
#define     lp0(i,begin,end)    for(ll i=begin;i<end;i++)
#define     lp1(i,begin,end)    for(ll i=begin;i<=end;i++)
#define     rlp(i,begin,end)    for(ll i=end;i>=begin;i--)
#define     prec(n)             fixed<<setprecision(n)
#define     initial(a,i)        memset(a,i,sizeof(a))
#define     pb                  push_back
#define     PI                  3.1415926535897932384626433832795
#define     MOD                 1000000007
#define     F                   first
#define     S                   second
#define     all(a)              (a).begin(),(a).end()
#define     BPC(x)              __builtin_popcountll(x)
#define     gcd(a,b)            __gcd(a,b)

ll gcd(ll a,ll b) {if (a==0) return b;return gcd(b%a,a);}

ll power(ll x,ll n)
{
    ll result = 1;
    while (n)
    {
        if (n & 1)
            result = result * x;
        n = n / 2;
        x = x * x;
    }
    return result;
}


// Solution Function
void solution(ll compte)
{
    // cout<<compte<<"\n";
    ll n,m;
    cin>>n>>m;
    ll x =10;
    cout<<(m+(100*(10-min(x,n))) )<<"\n";
}
// Driver Function
int main()
{
    ll compte = 1;
    //test()
    //{
        solution(compte);
        compte++;
    //}
    return 0;
}

#include <bits/stdc++.h>
const int INF=1e9;
//const int MOD=1e9+7;
const int MOD=998244353;
const long long LINF=1e18;
using namespace std;
#define int long long
//template
std::vector<int> Factorial(5234567),Finverse(5234567);
int pw(int n,int k){
  if(k<0)return pw(n,k+MOD-1);
  int res=1;
  while(k){
    if(k&1)res*=n;res%=MOD;
    n*=n;n%=MOD;
    k>>=1;
  }
  return res;
}
void Cinit(){
  Factorial[0]=1;
  for(int i=1;i<5234567;i++)Factorial[i]=Factorial[i-1]*i%MOD;
  for(int i=0;i<5234567;i++)Finverse[i]=pw(Factorial[i],MOD-2);
}
int nCk(int n,int k){
  if(n<k)return 1;if(k<0)return 0;
  int res=Factorial[n];
  res*=Finverse[k];res%=MOD;
  res*=Finverse[n-k];res%=MOD;
  return res;
}
//main
signed main(){
  Cinit();
  int N,M;cin>>N>>M;
  int ans=nCk(3*M+(N-1),N-1);//cout<<ans<<endl;
  int mi=N*nCk(M-1+N-1,N-1)%MOD;
  ans-=mi;
  ans+=MOD;ans%=MOD;
  //cout<<ans<<endl;
  for(int i=M+1;i<=min(N,3*M);i++){
    if((i&1)!=((3*M)&1))continue;
    int p=(3*M-i)/2;
    int q=nCk(p+N-1,N-1);
    int s=nCk(N,i);
    int a=q*s%MOD;
    ans-=a;
    ans+=MOD;ans%=MOD;
  }
  cout<<ans<<endl;
}
