x1+...+xk = n (2)#11551

x1+...+xk = n (2)

1 second
128 megabytes
Medium

Given values of and , find the number of nonnegative integral solutions for the equation

x_1 + x_2 + ... + x_k = n

Input

Two positive integers and n~(k \le n \le 100).

Output

Print the number of nonnegative integral solutions for the given equation. It is known that the answer is no more than 10^{18}.

Examples

There are nonnegative integer solutions to the equation x_1 + x_2 + x_3 = 4:

  • (4,0,0) and its permutations

  • (3,1,0) and its permutations

  • (2,2,0) and its permutations

  • (2,1,1) and its permutations

In total there are 3 + 6 + 3 + 3 = 15 solutions.

Example 1

Loading
Loading