Jump#7310

Jump

1 second
64 megabytes
Medium

Little Maggie is standing at the bottom of a long flight of stairs. The bottom of the stairs has number , the bottommost step has number , the next step has number , and so on. The staircase is so long that Maggie is guaranteed not to reach its top.

Maggie will now perform consecutive actions. The actions are numbered through , in order. When performing action , Maggie chooses between two options: either she does nothing, or she jumps exactly steps up the stairs. In other words, if Maggie starts performing action standing on step , she will end it either on step , or on step Y + X.

For example, if n = 3, Maggie will make three consecutive choices: whether or not to jump step upwards, steps upwards, and then steps upwards.

One of the steps is broken. The number of this step is . Maggie cannot jump onto this step.

Input

You are given the integers (1 \le n \le 2000) and (1 \le badStep \le 4000000).

Output

Compute and print the number of the topmost step that can be reached by Maggie.

Examples

Example 1

Loading
Loading