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

#define int long long
#define double long double
#define rep(i, n) for (int i = 0; i < (int) n; i++)
#define reps(i, n) for (int i = 1; i <= (int) n; i++)
#define all(p) (p).begin(), (p).end()
#define uniq(v) v.erase(unique(v.begin(), v.end()), v.end());
#define bit(n) (1LL << (n))
#define dump(p) cerr << #p " = " << p << endl
using vint=vector<int>;
using vvint=vector<vint>;
using pint=pair<int, int>;
using vpint=vector<pint>;
constexpr double pi = 3.1415926535897932384626433832795028;
constexpr int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
constexpr int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
inline int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
inline int lcm(int a, int b) { return a / gcd(a, b) * b; }
template<typename T> using priority_queue_rev=priority_queue<T, vector<T>, greater<T>>;
template<typename T1, typename T2> inline bool chmax(T1 &a, const T2 &b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
template<typename T1, typename T2> inline bool chmin(T1 &a, const T2 &b) {
    if (b < a) {
        a = b;
        return true;
    }
    return false;
}
template<typename T1, typename T2> ostream &operator<<(ostream &os, const pair<T1, T2> &p) {
    os << "(" << p.first << ", " << p.second << ")";
    return os;
}
template<typename T> ostream &operator<<(ostream &os, const vector<T> &p) {
    os << "{";
    for (auto itr = p.begin(); itr != p.end(); itr++) {
        itr++;
        if (itr != p.end()) { os << ", "; }
        itr--;
    }
    os << "}";
    return os;
}
struct SetUp {
    static constexpr int PREC = 20;
    SetUp() {
        cout << fixed << setprecision(PREC);
        cerr << fixed << setprecision(PREC);
    };
} setUp;

template<int MOD = 1000000007>
struct ModInt {
    int val;
    ModInt() : val(0) {}
    ModInt(long long val_) : val(val_ >= 0 ? val_ % MOD : (MOD - (-val_) % MOD) % MOD) {}
    ModInt &operator+=(const ModInt &p) {
        if ((val += p.val) >= MOD) { val -= MOD; }
        return *this;
    }
    ModInt &operator-=(const ModInt &p) {
        if ((val += MOD - p.val) >= MOD) { val -= MOD; }
        return *this;
    }
    ModInt &operator*=(const ModInt &p) {
        val = (int) ((long long) val * p.val % MOD);
        return *this;
    }
    ModInt &operator/=(const ModInt &p) {
        int a = p.val, b = MOD, u = 1, v = 0;
        while (b > 0) {
            int t = a / b;
            std::swap(a -= t * b, b);
            std::swap(u -= t * v, v);
        }
        *this *= ModInt(u);
        return *this;
    }
    ModInt operator-() const { return ModInt(-val); }
    ModInt operator+(const ModInt &p) const { return ModInt(*this) += p; }
    ModInt operator-(const ModInt &p) const { return ModInt(*this) -= p; }
    ModInt operator*(const ModInt &p) const { return ModInt(*this) *= p; }
    ModInt operator/(const ModInt &p) const { return ModInt(*this) /= p; }
    bool operator==(const ModInt &p) const { return val == p.val; }
    bool operator!=(const ModInt &p) const { return val != p.val; }
    ModInt pow(long long n) const {
        ModInt ret(1), mul(val);
        while (n > 0) {
            if (n & 1) { ret *= mul; }
            mul *= mul;
            n >>= 1;
        }
        return ret;
    }
    friend std::istream &operator>>(std::istream &is, ModInt &p) {
        long long v;
        is >> v;
        p = ModInt<MOD>(v);
        return (is);
    }
    friend std::ostream &operator<<(std::ostream &os, const ModInt &p) { return os << p.val; }
    struct Combination {
        std::vector<ModInt> fact, finv, inv;
        Combination(int n) : fact(n + 1), finv(n + 1), inv(n + 1) {
            fact[0] = fact[1] = 1;
            finv[0] = finv[1] = 1;
            inv[1] = 1;
            for (int i = 2; i <= n; i++) {
                fact[i] = fact[i - 1] * i;
                inv[i] = -inv[MOD % i] * (MOD / i);
                finv[i] = finv[i - 1] * inv[i];
            }
        }
        ModInt P(int n, int r) const {
            if (r < 0 || n < r) { return 0; }
            return fact[n] * finv[n - r];
        }
        ModInt C(int n, int r) const {
            if (r < 0 || n < r) { return 0; }
            return fact[n] * finv[r] * finv[n - r];
        }
        ModInt H(int n, int r) const {
            if (n < 0 || r < 0) { return 0; }
            return r == 0 ? 1 : C(n + r - 1, r);
        }
    };
};

int N, M;
using Mint=ModInt<998244353>;
signed main() {
    cin >> N >> M;
    Mint::Combination comb(N + 2 * M);
    vector<Mint> Hsum(2 * M);
    rep(i, 2 * M) { Hsum[i] = comb.H(N - 1, i); }
    for (int i = 1; i < 2 * M; i++) { Hsum[i] += Hsum[i - 1]; }
    Mint ans = 0;
    for (int i = 0; i <= M; i++) {
        if (i > N) { continue; }
        if ((M - i) & 1) { continue; }
        int K = M + (M - i) / 2;
        ans += comb.C(N, i) * (comb.H(N, K) - Hsum[K - M] * N);
    }
    ans += comb.H(N - 1, M) * N;
    cout << ans << endl;
}


Measured memory_bytes: 54912