#CCBCHBAHAI0000157. Chọn đội (Choosing Teams)

Chọn đội (Choosing Teams)

Choosing Teams

Source: Codeforces

Version: Phuoc Hung OJ Extended

Problem Statement

There are nn students. Student ii has already participated in the world championship yiy_i times, and no student may participate more than 55 times.

Each new team must contain exactly 33 distinct students, and no student may belong to two teams. Every chosen team must be able to participate with the same members at least kk more times.

Thus student ii is eligible exactly when

yi+k≤5.y_i+k\le5.

Compute the maximum number of teams that can be formed.

Input

  • The first line contains integers nn and kk.
  • The second line contains nn integers y0,y1,…,yn−1y_0,y_1,\ldots,y_{n-1}.

Output

Print one integer: the maximum number of teams.

Subtasks

Subtask 1 (100 points): 1≤n≤20001\le n\le2000; 1≤k≤51\le k\le5; 0≤yi≤50\le y_i\le5.

Examples

Input

5 2
0 4 5 1 0

Output

1

Explanation

The condition is yi+2≤5y_i+2\le5, or yi≤3y_i\le3. Exactly three students are eligible, so exactly one team can be formed.