You are moving from one apartment to another.
There are $$$n$$$ caps and $$$n$$$ pairs of sneakers in the old apartment. You also have a suitcase of size $$$W$$$ that you can use to transport caps and sneakers.
For every integer $$$i$$$ from $$$1$$$ to $$$W-1$$$, consider the following moving scenario:
In each scenario, you may make several trips from the old apartment to the new one. After every such trip except the last one, you return back to the old apartment.
During every trip from the old apartment to the new one:
During every return trip from the new apartment to the old one you must wear exactly one pair of sneakers and you carry the empty suitcase back. You don't have to wear the cap, so if you had one on during the forward trip, you can leave it at the new apartment.
Let $$$f(i)$$$ be the minimum possible number of trips from the old apartment to the new one required to move all $$$n$$$ caps and all $$$n$$$ pairs of sneakers to the new apartment in the scenario where cap has size $$$i$$$.
Your task is to compute $$$\sum_{i=1}^{W-1} f(i)$$$ modulo $$$998244353$$$.
The only line contains two integers $$$n$$$ and $$$W$$$ ($$$2 \le n,\ W \le 5 \times 10^{17}, n \times W \le 10^{18}$$$)
Print one integer: the value of $$$\sum_{i=1}^{W-1} f(i)$$$ modulo $$$998244353$$$.
3 5
8
5 5
14
67 69
3602
For the first sample test, 2 forward trips for each of 2 scenarios is achievable: transferring 1 cap + 1 sneakers pair per trip in a suitcase.
For the second sample test, $$$f(1) = 4,\ f(2) = 4,\ f(3) = 3,\ f(4) = 3$$$. For scenarios with answer 4, you can transfer 1 cap + 1 sneakers pair per trip in a suitcase. For $$$i = 3$$$ and $$$i = 4$$$ you can transfer one suitcase with 2 sneakers pairs and wear 1 cap that you keep at the new apartment. In the next trips you transfer 1 cap + 1 sneakers pair twice.
For both of described tests, 1 sneakers pair and 1 cap is worn during the last trip, and so is considered delivered.