LearnPy Hub
← Arena
EasyRating 900

Emptying the Juicer

Oranges are offered in order. Oranges bigger than b are thrown away. The others go into the juicer; when the total size squeezed exceeds d, the waste bin is emptied and the total resets to 0. How many times is the bin emptied?

Input

n, b, d, then n sizes.

Output

A count.

Sample 1

Input
2 7 10
5 6
Output
1

Sample 2

Input
1 5 10
7
Output
0
solution.py
Output appears here
Emptying the Juicer · Python Arena problem · LearnPy Hub