Vanya and his friends are walking along the fence of height h and they do not want the guard to notice them. In order to achieve this the height of each of the friends should not exceed h. If the height of some person is greater than h he can bend down and then he surely won't be noticed by the guard. The height of the i-th person is equal to ai.
Consider the width of the person walking as usual to be equal to 1, while the width of the bent person is equal to 2. Friends want to talk to each other while walking, so they would like to walk in a single row. What is the minimum width of the road, such that friends can walk in a row and remain unattended by the guard?
Input
The first line of the input contains two integers n and h (1 ≤ n ≤ 1000, 1 ≤ h ≤ 1000) — the number of friends and the height of the fence, respectively.
The second line contains n integers ai (1 ≤ ai ≤ 2h), the i-th of them is equal to the height of the i-th person.
Output
Print a single integer — the minimum possible valid width of the road.
Examples
Input
3 7
4 5 14
Output
4
Input
6 1
1 1 1 1 1 1
Output
6
Input
6 5
7 6 8 9 10 5
Output
11
Note
In the first sample, only person number 3 must bend down, so the required width is equal to 1 + 1 + 2 = 4.
In the second sample, all friends are short enough and no one has to bend, so the width 1 + 1 + 1 + 1 + 1 + 1 = 6 is enough.
In the third sample, all the persons have to bend, except the last one. The required minimum width of the road is equal to 2 + 2 + 2 + 2 + 2 + 1 = 11.
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
We need to understand the problem: There are n persons, each with height a_i. The fence height is h. If a person's height > h, then to avoid detection they must bend down. When bending, the width they occupy becomes 2 (instead of 1 when walking normally). They want to walk in a single row, side by side, so the total width is the sum of individual widths. We need minimum possible width? Wait, but there's an option: If a person's height > h, they must bend. If <= h, they can walk normally (width 1). But is there any choice? The problem says: "If the height of some person is greater than h he can bend down and then he surely won't be noticed by the guard." So bending is an option to avoid being noticed, but perhaps they could also not bend? But then they would be noticed, which is not allowed. So for each person with a_i > h, they must bend, otherwise they would be noticed. For those with a_i <= h, they can walk normally. Could they also bend? Possibly they could bend even if not necessary? The problem says "If the height of some person is greater than h he can bend down and then he surely won't be noticed." It doesn't say that shorter persons can't bend, but would bending increase width? If they bend unnecessarily, they would take width 2, making total width larger. Since we are asked for minimum width, they would not bend unless necessary. So the minimum width is simply: for each i, if a_i > h then add 2, else add 1. Sum. That is what examples show.
But is there any twist? Let's re-read: "Consider the width of the person walking as usual to be equal to 1, while the width of the bent person is equal to 2. Friends want to talk to each other while walking, so they would like to walk in a single row. What is the minimum width of the road, such that friends can walk in a row and remain unattended by the guard?" So indeed we want minimal total width ensuring all are unattended. Since bending is only forced when a_i > h, we can simply count. So the solution is straightforward.
But wait: there might be a nuance: If a person is tall (a_i > h) but perhaps they could somehow not bend? But then guard would notice, so not allowed. So they must bend. So answer = sum_{i=1..n} (1 if a_i <= h else 2). That's it.
But the problem rating might be 800, but that is too simple. Let's see constraints: n up to 1000, a_i up to 2h. No problem.
Check examples: Example 1: n=3, h=7, a=[4,5,14] => 4,5 <=7 so width1 each, 14>7 so width2 => total=1+1+2=4.
Example2: all 1 <=1 => sum of 1's =6.
Example3: h=5, a=[7,6,8,9,10,5] => all >5 except last (5<=5) => five persons must bend => 5*2=10 +1=11.
So solution is trivial.
But is there any possibility that a tall person can walk normally if some condition? No.
Thus answer: for each a_i, if a_i > h, ans+=2 else ans+=1.
Implementation: read n, h, loop reading a_i, accumulate.
But is there any hidden condition: a_i up to 2h? That's just to say that if a_i > h, at most 2h, but not necessary.
Edge cases: n=0? n>=1.
Time complexity O(n).
So that's the solution.
But maybe the problem expects output of minimum width, not just sum, but that's sum.
I'll produce final answer.
But wait: The problem says: "What is the minimum width of the road, such that friends can walk in a row and remain unattended by the guard?" If we assume the friends can order themselves arbitrarily? But order doesn't affect sum, because sum of widths is independent of order. So no need to consider ordering.
Thus simple.
But maybe they could walk not necessarily all in a single row? But they want to walk in a single row to talk. So yes.
Thus I'll answer.
I think the solution is correct.
Thus final code.
But let me think: Could a tall person be carried or something? No.
Thus answer.
I'll produce a Python solution.
But since the user might be asking for explanation, I'll provide reasoning.
Now generate final response. The problem is straightforward: each person can either walk normally (width = 1) if their height is ≤ h, or must bend (width = 2) if their height > h to avoid being seen. The total width of the row is the sum of individual widths. Since we want the minimum possible width, we never make a short person bend unnecessarily.
def solve():
import sys
data = sys.stdin.read().strip().split()
if not data:
return
n = int(data[0])
h = int(data[1])
a = list(map(int, data[2:2+n]))
total = 0
for x in a:
if x > h:
total += 2
else:
total += 1
print(total)
if __name__ == "__main__":
solve()