Background
If the music plays again
Leading you and me to fly
I will not fall
I will use all my strength
To hold hands once more and let the whole world resonate
Let us meet again
Feeling your dreams
Luo Tianyi gives you a tree, which initially consists of only a root node. At each time $t$ from $0$ to $n-1$, the following operation occurs:
- Every node whose depth is congruent to the current time $t$ modulo $2$ grows a leaf node. (The root node has a depth of $0$, and a child node's depth is the parent's depth $+1$).
Find the number of unordered pairs of nodes in the tree at a distance of $d$ after $n$ operations, modulo $998244353$.
Input
A single line containing two integers $n$ and $d$, representing the number of operations and the distance, respectively.
Output
A single line containing an integer $ans$, representing the number of unordered pairs modulo $998244353$.
Examples
Input 1
5 3
Output 1
16
Note 1
The unordered pairs are $(1,5)$, $(1,10)$, $(1,11)$, $(1,12)$, $(2,7)$, $(2,8)$, $(3,4)$, $(3,9)$, $(3,11)$, $(3,13)$, $(4,6)$, $(5,6)$, $(6,7)$, $(6,10)$, $(7,9)$, $(8,10)$, for a total of $16$ pairs.
Constraints
For all data: $1\leq n\leq 10^9$, $1\leq d\leq 10^5$.
Subtask 1 (1 pt): $1\leq n\leq 25$, $1\leq d\leq 400$.
Subtask 2 (7 pts): $1\leq n\leq 400$, $1\leq d\leq 400$.
Subtask 3 (10 pts): $1\leq n\leq 2000$, $1\leq d\leq 2000$.
Subtask 4 (14 pts): $1\leq n\leq 5000$, $1\leq d\leq 5000$.
Subtask 5 (19 pts): $1\leq d\leq 100$.
Subtask 6 (36 pts): $1\leq d\leq 5000$.
Subtask 7 (13 pts): No special restrictions.