#P6205. FJ's Tool Purchase Problem

    ID: 19424 Type: Default 1000ms 256MiB

FJ's Tool Purchase Problem

FJ's Tool Purchase Problem

FJ goes to the mall to buy tools. In the mall, there are K types of tools with prices \(1, 2, \ldots, K\) yuan respectively. FJ has N yuan and he must spend exactly all of his money. How many ways can he purchase the tools so that the total cost is exactly \(N\) yuan?

Note: Each type of tool is available in unlimited quantity.

Constraints: \(1 \leq K \leq 100\), \(1 \leq N \leq 1000\).

inputFormat

The input consists of a single line containing two integers K and N separated by a space.

outputFormat

Output the number of ways to buy tools so that the total cost equals exactly N yuan.

sample

3 3
3