Universal Cup Judging System

Universal Cup

Süre Sınırı: 7.0 s Bellek Sınırı: 1024 MB Toplam puan: 100 Hack'lenebilir ✓
İstatistikler

Consider the following operation on an array $a$ of length $n$. Choose an index $i$ ($1 \le i < n$), and then:

  • if $a_i = a_{i+1}$, decrease both $a_i$ and $a_{i+1}$ by $1$;
  • otherwise, decrease the smaller of $a_i$ and $a_{i+1}$ by $1$.

Every element of the array must be non-negative at all times, so an operation may only be applied when it does not make any element negative.

An array $a$ is called good if it is possible to make all of its elements equal to $0$ by applying this operation any number of times, possibly zero.

You are given $n$ and $k$. Count the good arrays $a$ of length $n$ satisfying $0 \le a_i \le k$ for every $i$, modulo $998\,244\,353$.

Input

The only line contains two integers $n$ and $k$ ($1 \le n,k \le 250\,000$).

Output

Print a single integer: the number of good arrays, taken modulo $998\,244\,353$.

Examples

Input 1

5 2

Output 1

36

Input 2

7 3

Output 2

855

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.