Greedy Aziz#9033

Greedy Aziz

1 second
128 megabytes
Very easy

Aziz loves chocolate candies very much. However, his father does not allow him to eat a lot of chocolate because it is bad for his teeth.

One day, his father gave him an array of integers. Each day, Aziz is allowed to eat as many candies as the number that appears most frequently in the array (i.e., the highest occurrence count of any single value).

Aziz wants to eat more candies by being clever. He is allowed to modify some numbers in the array without his father noticing. For each number in the array, he can increase or decrease it by 1, and each number can be changed at most once.

Aziz wants to maximize the number of candies he can eat in a day. Help him achieve this.

Find the maximum number of candies Aziz can get after optimally changing the numbers in the array (each by at most 1).

Input

The first line contains a single integer (1 \leq n \leq 10^5), the number of elements in the array. The second line contains integers a_1, a_2, \ldots, a_n (0 \leq a_i \leq 10^9), the elements of the array.

Output

Print a single integer: the maximum number of candies Aziz can get.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading