#include using namespace std; #define rep(i,n) for(int i = 0; i < (int)n; i++) using ll = long long; const ll mod = 998244353; int main(){ ll n, m; cin >> n >> m; if(n > m) cout << 1 << endl; else { vector dp(m+1); dp[0] = 1; for(int i = 1; i <= m; i++) { (dp[i] += dp[i-1]) %= mod; if(i-n >= 0) (dp[i] += dp[i-n]) %= mod; } cout << dp[m] << endl; } return 0; }