Problem C. Casino

Author:佳木斯大学, A. Usmanov. Translation: V. Toropov.   Time limit:1 sec
Input file:Standard input   Memory limit:256 Mb
Output file:Standard output  

Statement

Aningaaq and his N brothers went to a casino. Today they are going to play following game. First they agree about their bet. They can't change this bet later. The game consists of several rounds. Each round, every player is going to bet or to pass. Winner is somehow determined and receives some prize (not money).

The oldest brother got the largest amount of money from parents. The second oldest brother got one dollar less than the oldest brother. The third oldest got two dollars less than the oldest brother. And so on. Aningaaq is the youngest brother. He got only M dollars.

Brothers are going to play while somebody has any money. And they are not supposed to give money to each other.

Aningaaq is worried that game can last very long and they are going to be late at home. Help him to find out the minimal possible number of rounds.

Input format

First line contains two integers N and M — number of Aningaaq's brothers and amount of money Aningaaq has.

Output format

Print one integer — minimal possible number of rounds.

Constraints

0 ≤ N ≤ 40

1 ≤ M ≤ 1000

Sample tests explanation

In the first test Aningaaq is alone, so he can bet all his money in the first (and single) round.

In the second test Aningaaq has 1 dollar. His brother has 2 dollars. Brothers can agree that the bet is one dollar. Then, in the first round Aningaaq will spend all his money and his brother will have one more dollar to play another round.

Sample tests

No. Standard input Standard output
1
0 2
1
2
1 1
2

0.062s 0.009s 13