#C10458. Maximum Workshops

    ID: 39665 Type: Default 1000ms 256MiB

Maximum Workshops

Maximum Workshops

You are given a list of workshops where each workshop has a certain number of registered participants, and a minimum required number of participants m. Your task is to determine the maximum number of workshops that can be held such that each workshop has at least m participants.

Formally, if the number of participants in the ith workshop is a_i, then the answer is:

[ \text{Count} = \sum_{i=1}^{n} \mathbf{1}{a_i \ge m} ]

where \(\mathbf{1}\{\cdot\}\) is the indicator function.

Note: The input will be provided via stdin and the output should be printed to stdout.

inputFormat

The first line of input contains two integers n and m where:

  • n is the number of workshops (0 ≤ n ≤ 105).
  • m is the minimum number of participants required for a workshop to be held.

The second line contains n integers, each representing the number of participants in a workshop.

outputFormat

Output a single integer representing the maximum number of workshops that satisfy the minimum participant requirement.

## sample
5 40
30 70 45 20 50
3

</p>