RETO5 - EXPRIMIDOR Grado 11

Kolya is going to make orange juice. He has n oranges sizes a1, a2 ... an. Kolya lay them in the blender in a fixed order, from orange size a1 then a2 size orange and so on. To be put in the blender the orange should have a size not greater than B, so if Kolya sees an orange that is strictly greater than B strip away and continues to the next.

The juicer has a special section to collect waste. This section overflows if the sum of squeezed oranges size is greater than d. When this happens, Kolya empties the waste section (even if there are no more oranges to be squeezed) and continues to squeeze the juice. How many times does Kolya have to empty the waste section?

Spanish version

Input

The first line of the input contains three integers n, B and d (1 ≤ n ≤ 100000, 1 ≤ B ≤ d ≤ 1000000) - the number of oranges, the maximum size of the orange that fits in the blender and the d value, which determines the condition when the section waste must be emptied.

The second line contains n integers a1, a2 ... n (1 ≤ ai ≤ 1000000) - oranges sizes listed in the order and Kolya will try to put in blender.

Output

Print one integer - the number of times Kolya will have to empty the waste section.

Example

Input:
2 7 10
5 6

Output:
1
Input:
1 5 10
7

Output:
0

Explanation

In the first example, Kolya squeeze the juice of two oranges and empty the waste section later.

In the second example, the orange will not fit into the juicer so that Kolya will not have any juice at all.

In the third example, Kolya squeeze the juice of two oranges and empty the waste section later, then squeezes the other orange.


Added by:MaratónAFDM
Date:2016-10-07
Time limit:2s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:C NCSHARP CSHARP C++ 4.3.2 JAVA JULIA PYTHON PYPY3 PYTHON3

© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.