Polynomials
Consider a polynomial with k variables, represented as a sum of monomials:
,
Here, p(i, j) denotes the degree of the j-th variable in the i-th monomial (p(i, j) ≥ 0), and a_i is a non-zero integer constant. The degree of a monomial is the sum of the degrees of all its variables. The degree of a polynomial in several variables is the highest degree among all its monomials, expressed as an integer. By minimizing m (after combining like terms) and ordering the monomials by criteria such as degree first and then lexicographically, we achieve the canonical representation of the polynomial. This ensures a unique expression for any polynomial. A polynomial is termed complete if its canonical representation includes all possible monomials. For example, a complete polynomial of degree 3 in 2 variables is:
P(x, y) = a_10x^3 + a_9x^2y + a_8xy^2 + a_7y^3 + a_6x^2 + a_5xy + a_4y^2 + a_3x + a_2y + a_1
Once, little Dima delved into studying complex topological properties of algebraic structures and faced the following problem.
Dima has a complete polynomial of degree n in k variables and wants to know:
(a) If the degree of the polynomial is even, how many monomials of even degree are present in its canonical representation?
(b) If the degree of the polynomial is odd, how many monomials of odd degree are present in its canonical representation?
Input
The first line of the input contains two integers separated by a space: n – the degree of the polynomial (0 ≤ n ≤ 500) and k – the number of variables (1 ≤ k ≤ 500).
Output
The output should be a single line containing one number – the answer to Dima's question.