Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

No tag edit access

The problem statement has recently been changed. View the changes.

×
C. Balanced Team

time limit per test

2 secondsmemory limit per test

256 megabytesinput

standard inputoutput

standard outputYou are a coach at your local university. There are $$$n$$$ students under your supervision, the programming skill of the $$$i$$$-th student is $$$a_i$$$.

You have to create a team for a new programming competition. As you know, the more students some team has the more probable its victory is! So you have to create a team with the maximum number of students. But you also know that a team should be balanced. It means that the programming skill of each pair of students in a created team should differ by no more than $$$5$$$.

Your task is to report the maximum possible number of students in a balanced team.

Input

The first line of the input contains one integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^5$$$) — the number of students.

The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^9$$$), where $$$a_i$$$ is a programming skill of the $$$i$$$-th student.

Output

Print one integer — the maximum possible number of students in a balanced team.

Examples

Input

6 1 10 17 12 15 2

Output

3

Input

10 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337

Output

10

Input

6 1 1000 10000 10 100 1000000000

Output

1

Note

In the first example you can create a team with skills $$$[12, 17, 15]$$$.

In the second example you can take all students in a team because their programming skills are equal.

In the third example you can create a team consisting of a single student (and you cannot create a team consisting of at least two students).

Codeforces (c) Copyright 2010-2022 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Oct/01/2022 17:23:59 (h1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|