Guziki

No attempts yetTime limit1sMemory limit128 MB

Problem

Yogi the bear came up with a new game. He arranged n2n^2 buttons in a square on the table, that is, an n×nn \times n grid with nn buttons along each side.

Yogi wonders how many lines pass through the button at the very center of the square such that the number of buttons lying on the line is exactly gg. Treat every button as a point in the plane.

Input

The first line contains two integers nn and gg (1gn<21061 \le g \le n < 2 \cdot 10^6, and nn is odd).

Output

Print a single integer, the number of lines described above. If that number is greater than 101210^{12}, print 1-1 instead.