cho.sh
Notes
Loading...

Obstacle Course Design

Time limit

2s

Memory limit

128 MB

Problem

Donggyu wants to design an obstacle course in a gym. The course can contain m obstacles in a line, and all obstacle heights are distinct. Each obstacle has two supports.

When building the course, obstacles may be placed next to one another. You may also split the space between the two supports of an obstacle and insert other obstacles there. Every inserted obstacle must be taller than the obstacle whose supports were split.

After the course is completed, a player travels from the ground on the left to the ground on the right. Whenever the path moves from the ground or a lower obstacle to a higher obstacle, the difficulty increases by 1. Moves from a higher place to a lower place do not increase the difficulty.

Given m obstacles and a target difficulty k, compute how many different courses can be made with exactly that difficulty.

Input

The first line contains two integers m and k. (0 <= m <= 50, 0 <= k <= 128)

Output

Print the number of courses whose difficulty is exactly k. The answer has at most 100 decimal digits.