Problems

# Product sum

# Product sum

There is a set of variables **x _{1}**,

**x**, ...,

_{2}**x**. Each variable

_{N}**x**can be assigned the value

_{i}**-1**,

**0**,

**+1**only. For a given integer p you are to calculate the number of ways variables

**x**can be assigned values so that the sum of all possible products

_{i}**x**is equal to

_{i}·x_{j}**S**, where

**i**<

**j**and

**i**,

**j**=

**1**,

**2**, ...,

**N**. Two ways are considered different if they contain a different number of

**x**=

_{i}**0**.

**Input**

The input file contains two numbers: **N** and **S**, separated by space.

**2** ≤ **N** ≤ **10000**, **-10000** < **S** < **10000**.

**Output**

The output file should contains only one integer – the number of ways to represent **S** as a sum of products.

Input example

Sample 1 5 0 Sample 2 3 -2

Output example

Sample 1 3 Sample 2 0