Boxes and Stones

No attempts yetTime limit1sMemory limit128 MB

Problem

Paul and Carole play a game with $S$ stones and $B$ boxes numbered from $1$ to $B$. Before the game begins, the $S$ stones are distributed arbitrarily among boxes $1$ through $B-1$, leaving box $B$ empty. The game then proceeds in rounds.

In each round, Paul first chooses a subset $P$ of the stones currently in the boxes; he may take as many stones as he wants from as many boxes as he wants, or none at all, in which case $P$ is empty. Then Carole decides between two actions:

  • promote $P$ and discard the remaining stones, or
  • discard $P$ and promote the remaining stones.

To promote a stone means to move it to the box with the next number, so a stone in box $b$ moves to box $b+1$. To discard a stone means to remove it from its box permanently, so it is not used in any later round.

Play continues until some stone reaches box $B$, in which case Paul wins, or until no stones remain in the boxes, in which case Carole wins. Both players play optimally. Count the number of initial distributions of the $S$ stones among boxes $1$ through $B-1$ for which Carole can be certain of winning, even if Paul never makes a mistake.

Input

The input consists of several test cases, one per line, until end of file. Each line contains two integers $S$ and $B$ ($1 \le S \le 200$, $2 \le B \le 100$), the number of stones and the number of boxes.

Output

For each test case, print on its own line the number of ways to distribute the $S$ stones among the first $B-1$ boxes so that Carole is certain to win. Because this number can be very large, print it modulo $10^9 + 7$.