#include <bits/stdc++.h>
using namespace std;
const int mod = 998244353;
vector<int> fact, inv, factinv;
inline int binomial_coefficient(int a, int b) {
return 1LL * fact[a] * factinv[b] % mod * factinv[a - b] % mod;
}
int n; long long m;
int main() {
cin >> n >> m;
if(n > 200000 || m > 200000) return 0;
fact.resize(n + m + 1); fact[0] = 1;
for(int i = 1; i <= n + m; i++) fact[i] = 1LL * fact[i - 1] * i % mod;
inv.resize(n + m + 1); inv[1] = 1;
for(int i = 2; i <= n + m; i++) inv[i] = 1LL * inv[mod % i] * (mod - mod / i) % mod;
factinv.resize(n + m + 1); factinv[0] = 1;
for(int i = 1; i <= n + m; i++) factinv[i] = 1LL * factinv[i - 1] * inv[i] % mod;
vector<int> g(m + 1, 0); g[1] = 1;
for(int i = 2; i <= m; i++) g[i] = (g[i - 1] + g[i - 2]) % mod;
int ret = 0;
if(n == 1) ret = g[m];
else {
for(int i = 1; i <= m; i++) {
long long res = 1LL * binomial_coefficient(n - 2 + m - i, n - 2) * g[i];
ret = (ret + res) % mod;
}
}
cout << ret << endl;
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CmNvbnN0IGludCBtb2QgPSA5OTgyNDQzNTM7CnZlY3RvcjxpbnQ+IGZhY3QsIGludiwgZmFjdGludjsKaW5saW5lIGludCBiaW5vbWlhbF9jb2VmZmljaWVudChpbnQgYSwgaW50IGIpIHsKCXJldHVybiAxTEwgKiBmYWN0W2FdICogZmFjdGludltiXSAlIG1vZCAqIGZhY3RpbnZbYSAtIGJdICUgbW9kOwp9CmludCBuOyBsb25nIGxvbmcgbTsKaW50IG1haW4oKSB7CgljaW4gPj4gbiA+PiBtOwoJaWYobiA+IDIwMDAwMCB8fCBtID4gMjAwMDAwKSByZXR1cm4gMDsKCWZhY3QucmVzaXplKG4gKyBtICsgMSk7IGZhY3RbMF0gPSAxOwoJZm9yKGludCBpID0gMTsgaSA8PSBuICsgbTsgaSsrKSBmYW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