N balloons float in a large room, lined up from left to right. Jinsol likes archery and always shoots to the right, starting from the left side of the room. She picks the height of each shot herself.
An arrow flies to the right at the chosen height H and pops the first balloon it meets at that height. The popped balloon disappears, and the arrow keeps flying to the right one unit lower, at height H−1.
Jinsol wants to pop every balloon. Find the smallest number of arrows that does it.
Input
The first line has the integer N.
The second line has the heights H1,H2,…,HN of the N balloons, in order from left to right. Hi is the height of the i-th balloon from the left.
1≤N≤106
1≤Hi≤106
Output
Print the smallest number of arrows needed to pop every balloon.
Hint
In the first example one arrow pops the balloons at heights 5, 4, and 3, and a second arrow pops the balloons at heights 2 and 1. Two arrows are enough.