Space Station Docking Bay Configuration#401

Space Station Docking Bay Configuration

4 seconds
256 megabytes
Very easy

The International Space Engineering Consortium is designing a modular space station with an innovative nested docking bay system. The station's chief architect requires an analysis tool to determine all valid docking bay configurations.

In this system, docking bays can be nested within other docking bays, creating complex hierarchical structures. Each valid configuration must follow strict safety protocols:

Let be the set of all valid docking bay configurations. The length of a configuration is the total number of docking operations (entries and exits) required. The nesting depth of configuration is defined as follows:

Each pair of parentheses represents an entry and exit from a docking bay level.

For example, the configuration has length ( pairs of entry/exit operations) and nesting depth (maximum of nested levels).

The engineering team needs to determine: for a given length (number of docking operations) and required nesting depth (exactly levels deep), how many distinct valid configurations are there?

Constraints:

Input

Each line contains two integers and , where is the total number of docking operations (must be even), and is the required nesting depth. The input may contain empty lines, which should be ignored.

Output

For each test case, print on a separate line the number of valid docking bay configurations of length and nesting depth exactly .

Examples

Example 1

Loading
Loading