URI Online Judge | 1553

Frequent Asked Questions

By Cristhian Bonilha, UTFPR BR Brazil

Timelimit: 1

Lots of sites in the internet have a page called “Frequent Asked Questions” that, as the name itself says, contains the questions that the users make frequently.

The URI portal is used to receive lots of questions from their users, so Neilor decided that it would be a good idea to add a Frequent Asked Questions page to the site. As Neilor is very busy these days, he asked you to help him with this page.

Given the identifiers of the questions asked by the users, say the number of questions that will be added to this new page of the site. A question is considered “frequent” when it is asked at least K times.

Input

There will be several test cases. Each test case starts with two integers N and K (1 ≤ N ≤ 1000, 1 ≤ K ≤ 100), indicating the number of asked questions, and the number of times a question must be asked to be considered “frequent”, respectively.

Following there will be N integers P (1 ≤ P ≤ 100), each indicating the number of a question asked.

The last test case is indicated when N = K = 0, which should not be processed.

Output

For each test case print one line, containing one integer, indicating the number of questions that will be added to this new page of the site.

Sample Input Sample Output
5 2
1 4 2 1 3
5 2
1 1 2 3 2
8 3
1 1 3 5 4 6 3 4
8 3
1 1 1 1 1 1 1 1
0 0
1
2
0
1