Chef and Division 3 DIVTHREE

Read problem statements in Hindi, Bengali, Mandarin Chinese, Russian, and Vietnamese as well.

Chef wants to host some Division-3 contests. Chef has $N$ setters who are busy creating new problems for him. The $i^{th}$ setter has made $A_i$ problems where $1 \leq i \leq N$.

A Division-3 contest should have exactly $K$ problems. Chef wants to plan for the next $D$ days using the problems that they have currently. But Chef cannot host more than one Division-3 contest in a day.

Given these constraints, can you help Chef find the maximum number of Division-3 contests that can be hosted in these $D$ days?

Input:

Output:

For each test case, print a single line containing one integer ― the maximum number of Division-3 contests Chef can host in these $D$ days.

Constraints

Subtasks

Subtask #1 (40 points):

Subtask #2 (60 points): Original constraints

Sample Input:

5
1 5 31
4
1 10 3
23
2 5 7
20 36
2 5 10
19 2
3 3 300
1 1 1

Sample Output:

0
2
7
4
1

Explanation: