#K90467. Minimum Number of Shelves

    ID: 37759 Type: Default 1000ms 256MiB

Minimum Number of Shelves

Minimum Number of Shelves

You are given a collection of m books with various heights. Books with the same height must be placed on shelves separately because a single shelf can hold at most c books of the same height.

For each distinct height \(h\), if there are \(n_h\) books, then the number of shelves needed for that height is given by \(\lceil \frac{n_h}{c} \rceil\). The total number of shelves required is the sum of the shelves needed for each distinct height.

Your task is to determine and output the minimum number of shelves required to store all the books.

inputFormat

The input is given from standard input (stdin) and consists of two lines:

  1. The first line contains two integers m and c where m is the number of books, and c is the maximum number of books that can be placed on a shelf (for books of the same height).
  2. The second line contains m space-separated integers representing the heights of the books.

outputFormat

Output a single integer on standard output (stdout) — the minimum number of shelves required to store all the books.

## sample
5 2
1 2 1 2 1
3

</p>