Problem: You 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 ≤ n ≤ 2 ⋅ 10^5) — the number of students.

The second line of the input contains n integers a_1, a_2, ..., a_n (1 ≤ a_i ≤ 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).

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
namespace IO {
int double_len(6);
bool spacebar_can_see(1);
template <typename T>
class Number {
 public:
  unsigned int len;
  int hex;
  T number;
  inline Number(T number = 0, int hex = 10, int len = 0)
      : number(number), hex(hex), len(len) {}
  inline operator T() { return number; }
};
inline bool CanSee(char ch) {
  return spacebar_can_see ? (31 < ch && ch < 127) : (32 < ch && ch < 127);
}
inline bool IsNumber(char ch) { return (47 < ch && ch < 58); }
static const int IN_BUF = 1 << 23, OUT_BUF = 1 << 23;
inline char GetChar() {
  static char buf[IN_BUF], *ps = buf, *pt = buf;
  if (ps == pt) {
    ps = buf;
    pt = buf + fread(buf, 1, IN_BUF, stdin);
  }
  return ps == pt ? EOF : *ps++;
}
inline void PutChar(char ch) {
  static char pbuf[OUT_BUF], *pp = pbuf;
  struct Flusher {
    ~Flusher() { fwrite(pbuf, 1, pp - pbuf, stdout); }
  };
  static Flusher out_put_flusher;
  if (pp == pbuf + OUT_BUF) {
    fwrite(pbuf, 1, OUT_BUF, stdout);
    pp = pbuf;
  }
  *pp++ = ch;
}
char read_ch = '\n';
template <class T>
inline T ReadInt() {
  register T x(0);
  register bool f(1);
  while (!IsNumber(read_ch)) {
    if (read_ch == 45) {
      f = 0;
    }
    read_ch = GetChar();
  }
  while (IsNumber(read_ch)) {
    x = (x << 1) + (x << 3) + (read_ch ^ 48);
    read_ch = GetChar();
  }
  return f ? x : -x;
}
template <class T>
inline T ReadUInt() {
  register T x(0);
  while (!IsNumber(read_ch)) {
    read_ch = GetChar();
  }
  while (IsNumber(read_ch)) {
    x = (x << 1) + (x << 3) + (read_ch ^ 48);
    read_ch = GetChar();
  }
  return x;
}
inline double ReadDouble() {
  register long long int_num(ReadInt<long long>());
  if (read_ch == 46) {
    register double pow10(1.0), result(0);
    read_ch = GetChar();
    while (IsNumber(read_ch)) {
      pow10 /= 10.0;
      result += pow10 * (read_ch ^ 48);
      read_ch = GetChar();
    }
    return int_num + (int_num < 0 ? -result : result);
  } else {
    return (double)int_num;
  }
}
inline void ReadT(int &x) { x = ReadInt<int>(); }
inline void ReadT(long long &x) { x = ReadInt<long long>(); }
inline void ReadT(bool &x) { x = ReadUInt<bool>(); }
inline void ReadT(unsigned int &x) { x = ReadUInt<unsigned int>(); }
inline void ReadT(unsigned long long &x) { x = ReadUInt<unsigned long long>(); }
inline void ReadT(double &x) { x = ReadDouble(); }
inline void ReadT(char &s) {
  for (; !CanSee(read_ch) && (~read_ch); read_ch = GetChar())
    ;
  s = read_ch;
  read_ch = 10;
}
inline void ReadT(char *s) {
  register int len(0);
  for (; !CanSee(read_ch) && (~read_ch); read_ch = GetChar())
    ;
  for (; CanSee(read_ch) && (~read_ch); read_ch = GetChar()) {
    s[len++] = read_ch;
  }
  s[len] = 0;
  read_ch = 10;
}
template <typename T>
inline void ReadT(Number<T> &x) {
  ReadT(x.number);
}
template <typename T>
inline void Read(T &t) {
  ReadT(t);
}
template <typename T, typename... Args>
void Read(T &t, Args &...args) {
  ReadT(t);
  Read(args...);
}
const char NUMBER[36] = {48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 65, 66,
                         67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
                         79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90};
template <typename T>
void WriteUInt(T x) {
  if (9 < x) {
    WriteUInt(x / 10);
  }
  PutChar(x % 10 ^ 48);
}
template <typename T>
void WriteInt(T x) {
  if (x < 0) {
    PutChar(45);
    x = -x;
  }
  if (9 < x) {
    WriteUInt(x / 10);
  }
  PutChar(x % 10 ^ 48);
}
template <typename T>
void WriteUKInt(T x, int hex, int len) {
  if (hex <= x || 1 < len) {
    WriteUKInt(x / hex, hex, len - 1);
  }
  PutChar(NUMBER[x % hex]);
}
template <typename T>
void WriteKInt(T x, int hex, int len) {
  if (x < 0) {
    PutChar(45);
    --len;
    x = -x;
  }
  if (hex <= x || 1 < len) {
    WriteUKInt(x / hex, hex, len - 1);
  }
  PutChar(NUMBER[x % hex]);
}
inline void WriteDouble(double x, int len) {
  if (x < 0) {
    x = -x;
    PutChar(45);
  }
  WriteUInt((unsigned long long)x);
  if (len) {
    x -= (int)x;
    PutChar(46);
    while (len--) {
      x *= 10;
      if (!(unsigned long long)x) {
        PutChar(48);
      }
    }
    WriteUInt((unsigned long long)x);
  }
}
inline void WriteT(int x) { WriteInt<int>(x); }
inline void WriteT(long long x) { WriteInt<long long>(x); }
inline void WriteT(bool x) { WriteUInt<bool>(x); }
inline void WriteT(unsigned int x) { WriteUInt<unsigned int>(x); }
inline void WriteT(unsigned long long x) { WriteUInt<unsigned long long>(x); }
inline void WriteT(double x) { WriteDouble(x, double_len); }
inline void WriteT(char *s) {
  int len(strlen(s));
  while (len--) {
    PutChar(*s++);
  }
}
inline void WriteT(const char *s) {
  while (*s) {
    PutChar(*s++);
  }
}
inline void WriteT(char x) { PutChar(x); }
template <typename T>
inline void WriteT(Number<T> x) {
  if (typeid(T) == typeid(int) || typeid(T) == typeid(long long)) {
    WriteKInt(x.number, x.hex, x.len);
    return;
  }
  if (typeid(T) == typeid(unsigned int) ||
      typeid(T) == typeid(unsigned long long)) {
    WriteUKInt(x.number, x.hex, x.len);
    return;
  }
  WriteT("Can't write this type.");
}
template <typename T>
inline void Write(T t) {
  WriteT(t);
}
template <typename T, typename... Args>
void Write(T t, Args... args) {
  WriteT(t);
  Write(args...);
}
inline void Writeln() { PutChar(10); }
template <typename T>
inline void Writeln(T t) {
  WriteT(t);
  PutChar(10);
}
template <typename... Args>
inline void Writeln(Args... args) {
  Write(args...);
  PutChar(10);
}
template <typename... Args>
inline void WriteExit(Args... args) {
  Write(args...);
  PutChar(10);
  exit(0);
}
template <typename... Args>
inline void DeBug(Args... args) {}
template <typename... Args>
inline void DeBugln(Args... args) {}
inline void DeBugln() {}
}  // namespace IO
using namespace IO;
using namespace std;
template <typename T>
inline T Max(T a, T b) {
  return a < b ? b : a;
}
template <typename T, typename... Args>
T Max(T a, Args... args) {
  return Max(a, Max(args...));
}
template <typename T>
inline T Min(T a, T b) {
  return a < b ? a : b;
}
template <typename T, typename... Args>
T Min(T a, Args... args) {
  return Min(a, Min(args...));
}
template <typename T>
inline void Swap(T &a, T &b) {
  register T temp = a;
  a = b;
  b = temp;
}
const int MAXN = 2e5 + 5;
int n;
int arr[MAXN];
int main() {
  Read(n);
  for (int i = 1; i <= n; ++i) {
    Read(arr[i]);
  }
  sort(arr + 1, arr + 1 + n);
  int l = 1, answer = 1;
  for (int i = 1; i <= n; ++i) {
    while (5 < arr[i] - arr[l]) {
      ++l;
    }
    answer = Max(answer, i - l + 1);
  }
  Writeln(answer);
  return 0;
}