Mimi is building a house of cards! However, being the strange person that she is, she has
Mimi proceeds to build a house of cards by stacking the layers of cards, one on top of another. However, she realizes that people will become suspicious if the layers are too similar in width, or if the stack grows wider as it gets taller. Thus if layer
Given these constraints, what is the tallest house of cards Mimi can make?
Constraints
Subtask 1 [20%]
Subtask 2 [80%]
Input Specification
The first line will have two space separated integers,
The next line will have
Output Specification
A single integer, the number of layers in the tallest house of cards Mimi can make.
Sample Input
5 4
7 2 20 9 12
Sample Output
4
Comments
nice meme