B-trees
If a tree could speak...
A B-tree is a data structure used for storing data in secondary memory, such as on a hard disk. It has several defining properties:
Each non-leaf node has at least t children and at most 2·t children, where t is a parameter known as the branching factor.
Each leaf node contains a number of keys ranging from t-1 to 2·t-1.
The path length from the root to any leaf is the same for all leaves.
Note that the root node can also be a leaf.
Two B-trees are considered different if they differ as graphs with labeled vertices, or if a vertex with the same labels has a different number of keys. For instance, there are 8 distinct B-trees with four keys and a branching factor of 2:
Determine the number of distinct B-trees that can be formed with n keys in the leaves and a branching factor of t.
Input
The first line contains two natural numbers n and t - representing the number of keys in the leaves and the branching factor, respectively (1 ≤ n ≤ 500, 2 ≤ t ≤ 10^9).
Output
Output a single number on the first line, without leading zeros, representing the number of B-trees with n keys in the leaves and a branching factor of t.