Richard is a penguin who regularly commutes between Canada and the United States.
Specifically, Canada is at location
Richard does not believe in wasting time, so when he is commuting in one direction, he will always move in that direction. This means that when commuting from Canada to the United States, locations are monotonically increasing in number, and when commuting from the United States to Canada, locations are monotonically decreasing in number.
Richard's commute is complicated during the fall and spring when the ice is thawing between Canada and the United States. If Richard jumps on an ice block, that ice block will melt enough that it will not be usable on the return journey.
Count the number of distinct ways that Richard can do a round-trip commute from Canada to the United States and back. Two ways are distinct if, in some direction, Richard uses an ice block travelling in that direction in one way but not in the other way.
Constraints
In tests worth 1 mark,
In tests worth an additional 2 marks,
In tests worth an additional 3 marks,
In tests worth an additional 4 marks,
In tests worth an additional 4 marks,
Input Specification
The first and only line contains two integers,
Output Specification
Let 998244353
.
Sample Input
5 3
Sample Output
12
Comments