Cutting corners#2801

Cutting corners

0.1 seconds
64 megabytes
Very easy

Vasiliy was recently given a grid notebook. Being naturally curious, he immediately noticed that the notebook was square and that each sheet contains exactly N^2 identical cells. With nothing else to do, Vasiliy carefully removed one sheet from the notebook and began sequentially cutting out corners: first, simply one cell, then a corner one cell wide, which can be made by using the previously cut cell as the missing part of the corner, and then in the same way the next corner, and so on. To clarify, Vasiliy formed the following corners in sequence:

Here Vasiliy became interested: how many cells will be in the -th cut corner?

Input

The first and only line contains two natural numbers separated by a space: first, the number of cells on one sheet in Vasiliy's notebook, and second, the number of the corner Vasiliy is interested in. All input data is correct and does not exceed 2\cdot 10^9.

Output

Print a single number — the number of cells in the -th corner that interests Vasiliy, or if it is not possible for Vasiliy to cut out the required corner.

Examples

Example 1

Loading
Loading