AIM Tech Round 3 (Div. 2)
A
Juicer
Codeforces
900
原题
←B →
翻译中…

Kolya is going to make fresh orange juice. He has $*n*$ oranges of sizes $*a*_{1}, *a*_{2}, ..., *a*_{*n*}$. Kolya will put them in the juicer in the fixed order, starting with orange of size $*a*_{1}$, then orange of size $*a*_{2}$ and so on. To be put in the juicer the orange must have size not exceeding $*b*$, so if Kolya sees an orange that is strictly greater he throws it away and continues with the next one.

翻译中…

The juicer has a special section to collect waste. It overflows if Kolya squeezes oranges of the total size strictly greater than $*d*$. When it happens Kolya empties the waste section (even if there are no more oranges) and continues to squeeze the juice. How many times will he have to empty the waste section?

翻译中…

Input

翻译中…

The first line of the input contains three integers $*n*$, $*b*$ and $*d*$ ($1 ≤ *n* ≤ 100 000$, $1 ≤ *b* ≤ *d* ≤ 1 000 000$) — the number of oranges, the maximum size of the orange that fits in the juicer and the value $*d*$, which determines the condition when the waste section should be emptied.

翻译中…

The second line contains $*n*$ integers $*a*_{1}, *a*_{2}, ..., *a*_{*n*}$ ($1 ≤ *a*_{*i*} ≤ 1 000 000$) — sizes of the oranges listed in the order Kolya is going to try to put them in the juicer.

翻译中…

Output

翻译中…

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

翻译中…

Note

翻译中…

In the first sample, Kolya will squeeze the juice from two oranges and empty the waste section afterwards.

翻译中…

In the second sample, the orange won't fit in the juicer so Kolya will have no juice at all.

翻译中…

样例

Input #1
2 7 10
5 6
Output #1
1
InputCopy OutputCopy
Input #2
1 5 10
7
Output #2
0
InputCopy OutputCopy
Input #3
3 10 10
5 7 7
Output #3
1
InputCopy OutputCopy
Input #4
1 1 1
1
Output #4
0
InputCopy OutputCopy
题目信息
题号
709A
时间限制
1 s
内存限制
256 MB
标签
模拟

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。