Angry Cows (Bronze)

Starting from the best bale, count how many bales explode as the blast radius grows by one each step.

Easy3SimulationSortingInterviewNo attempts yetTime limit2sMemory limit512 MB

Problem

Bessie the cow has designed a video game she calls "Angry Cows". The player uses a slingshot to launch a single cow onto one of the hay bales that sit on a number line. The bale the cow lands on explodes, and the blast spreads to nearby bales and starts a chain reaction. The goal is to detonate as many bales as possible with one cow.

There are NN hay bales at distinct integer positions x1,x2,,xNx_1, x_2, \ldots, x_N on a number line. If the cow lands on the bale at position xx, that bale explodes with a blast radius of 11, so every other bale at distance at most 11 is engulfed. The engulfed bales all explode together at the next time step, each with a blast radius of 22, so any bale that has not exploded yet and sits at distance at most 22 is engulfed as well. At the following time step those newly engulfed bales explode with radius 33. In general, a bale that explodes at time tt has blast radius tt, and every bale engulfed by such an explosion explodes at time t+1t+1 with radius t+1t+1. A bale that has already exploded never explodes again.

Find the largest number of hay bales that explode when the cow is launched onto the best possible bale.

Input

The first line contains the number of hay bales NN (1N1001 \le N \le 100).

Each of the next NN lines contains one position xix_i (0xi1090 \le x_i \le 10^9).

All positions are distinct, and they are not necessarily given in increasing order.

Output

Print the largest number of hay bales that a single cow can detonate.

Hint

In the first example, launching the cow onto the bale at position 55 engulfs the bales at positions 44 and 66, and both explode with radius 22. Those two explosions engulf the bales at positions 33 and 88, which explode with radius 33. Radius 33 is not enough to reach the bale at position 1313.