#K56992. Roller Coaster Ride Eligibility
Roller Coaster Ride Eligibility
Roller Coaster Ride Eligibility
You are given your height h (in centimeters) and a list of integers representing the minimum height requirements for several roller coasters. Your task is to determine how many roller coasters you are eligible to ride.
The eligibility can be mathematically represented as follows:
\(\text{result} = \sum_{i=1}^{n} \mathbf{1}_{\{h \geq r_i\}}\), where \(r_i\) is the minimum height requirement for the i-th roller coaster and \(\mathbf{1}_{\{h \geq r_i\}}\) equals 1 if \(h \geq r_i\) and 0 otherwise.
Read the input from stdin and print the result to stdout.
inputFormat
The input consists of two lines:
- The first line contains a single integer h (your height in centimeters).
- The second line contains space-separated integers representing the minimum height requirements for the roller coasters. This line may be empty, which indicates that there are no roller coasters.
outputFormat
Output a single integer representing the number of roller coasters that you can ride.
## sample160
150 120 200 140
3