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.


-----Examples-----
Input
2 7 10
5 6

Output
1

Input
1 5 10
7

Output
0

Input
3 10 10
5 7 7

Output
1

Input
1 1 1
1

Output
0



-----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.

Difficulty: EASY

Solutions:
(n, b, d) = list(map(int, input().split()))
l = list(map(int, input().split()))
c = 0
tw = 0
for i in l:
	if i > b:
		continue
	tw += i
	if tw > d:
		c += 1
		tw = 0
print(c)


(n, b, d) = map(int, input().split())
oranges = list(map(int, input().split()))
empties = 0
garbage = 0
for orange in oranges:
	if orange > b:
		continue
	garbage += orange
	if garbage > d:
		garbage = 0
		empties += 1
print(empties)


(n, b, d) = map(int, input().split())
oranges = list(map(int, input().split()))
(waste, result) = (0, 0)
for x in oranges:
	if x <= b:
		waste = waste + x
	if waste > d:
		result = result + 1
		waste = 0
print(result)


x = input().split()
(n, b, d) = map(int, x)
a = list(map(int, input().split()))
total_size = 0
counter = 0
for i in a:
	if i > b:
		continue
	else:
		total_size += i
		if total_size > d:
			counter += 1
			total_size = 0
print(counter)


LINE1 = list(map(int, input().split()))
LINE2 = list(map(int, input().split()))
waste = 0
empty = 0
for i in LINE2:
	if i <= LINE1[1]:
		waste = waste + i
		if waste > LINE1[2]:
			waste = 0
			empty = empty + 1
print(empty)


(n, b, d) = map(int, input().split())
l = list(map(int, input().split()))
(s, sq) = (0, 0)
for x in range(n):
	if l[x] <= b:
		s += l[x]
		if s > d:
			sq += 1
			s = 0
print(sq)


(n, b, d) = map(int, input().split())
a = list(map(int, input().split()))
(sum, ans) = (0, 0)
for i in a:
	if i > b:
		continue
	sum += i
	if sum > d:
		ans += 1
		sum = 0
print(ans)


(n, b, d) = map(int, input().split())
a = list(map(int, input().split()))
c = 0
jc = 0
for i in a:
	if i <= b:
		jc += i
	if jc > d:
		c += 1
		jc = 0
print(c)


(n, b, d) = list(map(int, input().split()))
s = list(map(int, input().split()))
l = 0
o = 0
for i in s:
	if i <= b:
		l += i
		if l > d:
			l = 0
			o += 1
print(o)


(n, b, d) = [int(i) for i in input().split()]
kol = 0
_sum = 0
lst = list(map(int, input().split()))
for i in range(len(lst)):
	if lst[i] <= b:
		_sum += lst[i]
		if _sum > d:
			_sum = 0
			kol += 1
print(kol)


line1 = [int(x) for x in input().split()]
oranges = [int(x) for x in input().split()]
size = 0
times = 0
for o in oranges:
	if o <= line1[1]:
		size += o
		if size > line1[2]:
			times += 1
			size = 0
print(times)


(n, b, d) = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]
(c, j) = (0, 0)
for ai in a:
	if ai <= b:
		j += ai
	if j > d:
		j = 0
		c += 1
print(c)


e = 0
s = 0
l = []
n = 0
(a, b, c) = map(int, input().split())
for a in map(int, input().split()):
	l.append(a)
while n < len(l):
	if l[n] <= b:
		e += l[n]
		if e > c:
			e = 0
			s += 1
	n += 1
print(s)


(n, b, d) = [int(x) for x in input().split()]
a = [int(x) for x in input().split()]
total = 0
res = 0
for i in range(n):
	if a[i] <= b:
		total += a[i]
	if total > d:
		res += 1
		total = 0
print(res)


(n, b, d) = map(int, input().split())
lst = list(map(int, input().split()))
k = int()
m = int()
for n in lst:
	if n > b:
		continue
	m += n
	if m > d:
		m = 0
		k += 1
print(k)


(n, b, d) = map(int, input().split())
l = list(map(int, input().split()))
cache = 0
co = 0
for i in l:
	if i <= b:
		cache += i
	if cache > d:
		cache = 0
		co += 1
print(co)


(n, b, d) = [int(j) for j in input().split()]
nums = [int(j) for j in input().split()]
(count, size) = (0, 0)
for j in range(n):
	if nums[j] <= b:
		size += nums[j]
		if size > d:
			size = 0
			count += 1
print(count)


a = [int(x) for x in input().split()]
(n, b, d) = (a[0], a[1], a[2])
b = [int(x) for x in input().split() if int(x) <= b]
i = 0
sumo = 0
ans = 0
while i < len(b):
	sumo += b[i]
	if sumo > d:
		ans += 1
		sumo = 0
	i += 1
print(ans)


(n, m, d) = map(int, input().split())
a = list(map(int, input().split()))
v = 0
s = 0
for i in a:
	if i > m:
		continue
	else:
		s += i
		if s > d:
			v += 1
			s = 0
print(v)


(n, b, d) = [int(x) for x in input().split()]
oranges = [int(x) for x in input().split()]
total = 0
empty = 0
for i in oranges:
	if i > b:
		continue
	else:
		total += i
		if total > d:
			empty += 1
			total = 0
print(empty)


(n, b, d) = map(int, input().split())
arr = [int(i) for i in input().split()]
arr.append(0)
ans = 0
x = 0
for i in arr:
	if i > b:
		continue
	x += i
	if x > d:
		ans += 1
		x = 0
print(ans)


(n, b, d) = map(int, input().split())
s = 0
ans = 0
for i in map(int, input().split()):
	if i > b:
		continue
	s += i
	if s > d:
		s = 0
		ans += 1
print(ans)


s = input().split()
n = int(s[0])
b = int(s[1])
d = int(s[2])
mas = input().split()
for i in range(n):
	mas[i] = int(mas[i])
summ = 0
res = 0
for i in range(n):
	if mas[i] <= b:
		summ = summ + mas[i]
		if summ > d:
			summ = 0
			res = res + 1
print(res)


(n, b, d) = map(int, input().split())
size = list(map(int, input().split()))
sum = 0
count = 0
for i in range(0, n):
	if size[i] > b:
		continue
	else:
		sum = sum + size[i]
		if sum > d:
			count += 1
			sum = 0
print(count)


inp = input().split(' ')
n = int(inp[0])
b = int(inp[1])
d = int(inp[2])
l = input().split(' ')
l1 = list(map(int, l))
cap = 0
cnt = 0
for i in range(len(l1)):
	if l1[i] <= b:
		cap += l1[i]
		if cap > d:
			cnt += 1
			cap = 0
print(cnt)


(n, b, d) = map(int, input().split())
a = list(map(int, input().split()))
sum = 0
res = 0
for value in a:
	if value <= b:
		sum += value
	if sum > d:
		sum = 0
		res += 1
print(res)


(n, b, d) = input().split()
(n, b, d) = (int(n), int(b), int(d))
ls = list(map(int, input().split()))
mx = 0
sum = 0
for i in ls:
	if i > b:
		continue
	sum += i
	if sum > d:
		sum = 0
		mx += 1
print(mx)


(n, b, d) = map(int, input().split(' '))
list1 = list(map(int, input().split(' ')))
sum1 = 0
ct = 0
for j in list1:
	if j <= b:
		sum1 += j
		if sum1 > d:
			sum1 = 0
			ct += 1
print(ct)


(n, b, d) = map(int, input().split())
oranges = list(map(int, input().split()))
overflows = 0
theSum = 0
for orange in oranges:
	if orange <= b:
		theSum += orange
		if theSum > d:
			overflows += 1
			theSum = 0
print(overflows)


(n, b, d) = map(int, input().split())
a = list(map(int, input().split()))
waste = 0
count = 0
for i in a:
	if i <= b:
		waste += i
	if waste > d:
		waste = 0
		count += 1
print(count)


(n, capacity, wastefull) = list(map(int, input().split()))
a = list(map(int, input().split()))
c = capacity
w = wastefull
count = 0
for i in range(n):
	if a[i] <= capacity:
		w = w - a[i]
		if w < 0:
			count = count + 1
			w = wastefull
	else:
		continue
print(count)


(N, B, D) = map(int, input().split())
A = list(map(int, input().split()))
ans = 0
now = 0
for a in A:
	if a <= B:
		now += a
	if now > D:
		ans += 1
		now = 0
print(ans)


import math
(n, b, d) = tuple(map(int, input().strip().split()))
a = list(map(int, input().strip().split()))
waste = 0
oranges = 0
for i in a:
	if i <= b:
		if oranges + i <= d:
			oranges = oranges + i
		elif oranges + i > d:
			waste = waste + 1
			oranges = 0
print(waste)


(n, b, d) = list(map(int, input().split()))
a = list(map(int, input().split()))
ans = 0
i = 0
while i < n:
	sum = 0
	while sum <= d and i < n:
		if a[i] <= b:
			sum += a[i]
		i += 1
	if sum > d:
		ans += 1
print(ans)


(n, b, d) = map(int, input().split())
l = [int(x) for x in input().split()]
count = 0
x = 0
for i in range(n):
	if l[i] <= b:
		x = x + l[i]
	if x > d:
		x = 0
		count += 1
if x > d:
	count += 1
print(count)


import os
import sys
from io import BytesIO, IOBase
import math
from decimal import Decimal
from decimal import *
from collections import defaultdict, deque
import heapq
from decimal import Decimal
getcontext().prec = 25
abcd = 'abcdefghijklmnopqrstuvwxyz'
ABCD = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
months = {1: 31, 2: 28, 3: 31, 4: 30, 5: 31, 6: 30, 7: 31, 8: 31, 9: 30, 10: 31, 11: 30, 12: 31}
MOD = 1000000007
BUFSIZE = 8192
from bisect import bisect_left, bisect_right

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
(n, b, d) = map(int, input().split(' '))
ans = 0
t = 0
l = list(map(int, input().split(' ')))
for i in range(n):
	if l[i] > b:
		continue
	t += l[i]
	if t > d:
		ans += 1
		t = 0
print(ans)


(n, b, d) = [int(x) for x in input().split()]
a = [int(x) for x in input().split()]
(ans, c) = (0, 0)
for x in a:
	if x <= b:
		c += x
	if c > d:
		ans += 1
		c = 0
print(ans)


(n, b, d) = map(int, input().split())
a = list(map(int, input().split()))
k = 0
p = 0
for i in range(len(a)):
	if a[i] <= b:
		p += a[i]
	if p > d:
		k += 1
		p = 0
print(k)


(n, b, d) = map(int, input().split())
a = [int(x) for x in input().split()]
ans = 0
tmp = 0
for i in a:
	if i > b:
		continue
	tmp += i
	if tmp > d:
		tmp = 0
		ans += 1
print(ans)


(num, b, d) = map(int, input().split())
sizes = list(map(int, input().split()))
count = 0
result = 0
for orange in sizes:
	if orange <= b:
		count += orange
		if count > d:
			result += 1
			count = 0
print(result)


(n, b, d) = map(int, input().split())
arr = list(map(int, input().split()))
count = 0
t = 0
for i in arr:
	if i > b:
		continue
	t += i
	if t > d:
		t = 0
		count += 1
if t > d:
	count += 1
print(count)


(n, b, d) = [int(i) for i in input().split()]
oranges = [int(i) for i in input().split()]
total = 0
dispose = 0
for orange in oranges:
	if orange <= b:
		total += orange
	if total > d:
		dispose += 1
		total = 0
print(dispose)


(a, b, c) = map(int, input().split())
l = list(map(int, input().split()))
count = 0
juice = 0
for i in l:
	if i > b:
		pass
	else:
		juice += i
	if juice > c:
		juice = 0
		count += 1
	else:
		pass
print(count)


(x, y, z) = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]
b = 0
c = 0
for i in a:
	if i <= y:
		b += i
		if b > z:
			b = 0
			c += 1
print(c)


(n, b, d) = list(map(int, input().split()))
oranges = list(map(int, input().split()))
timesEmptied = 0
wasteMeter = 0
for orange in oranges:
	if orange <= b:
		wasteMeter += orange
	if wasteMeter > d:
		wasteMeter = 0
		timesEmptied += 1
print(timesEmptied)


(n, b, d) = map(int, input().split())
A = list(map(int, input().split()))
e = 0
an = 0
for (i, q) in enumerate(A):
	if q <= b:
		e += q
		if e > d:
			e = 0
			an += 1
print(an)


(n, b, d) = map(int, input().split())
l = list(map(int, input().split()))
waste = []
count = 0
for i in range(n):
	if l[i] <= b:
		waste.append(l[i])
		if sum(waste) > d:
			count += 1
			waste = []
print(count)


(n, b, d) = list(map(int, input().split()))
l = list(map(int, input().split()))
c = 0
x = d
j = 0
for i in range(n):
	if l[i] <= b:
		j += l[i]
	if j > d:
		j = 0
		c += 1
print(c)


(no_of_oranges, max_size, max_waste) = map(int, input().split())
oranges = list(map(int, input().split()))
waste_bin = 0
times = 0
for orange in oranges:
	if orange <= max_size:
		waste_bin += orange
		if waste_bin > max_waste:
			waste_bin = 0
			times += 1
print(times)


(n, b, d) = map(int, input().split())
(v, s, e) = (list(map(int, input().split())), 0, 0)
for i in v:
	if i <= b:
		s += i
	if s > d:
		(e, s) = (e + 1, 0)
print(e)


import math
(n, b, d) = input().split()
n = int(n)
b = int(b)
d = int(d)
sum1 = 0
count = 0
a = [int(x) for x in input().split()]
for i in range(len(a)):
	if a[i] <= b:
		sum1 += a[i]
		if sum1 > d:
			sum1 = 0
			count += 1
print(count)


import sys
input = sys.stdin.readline
(n, b, d) = map(int, input().split())
oranges = [int(x) for x in input().split()]
tot = 0
cnt = 0
for o in oranges:
	tot += o if o <= b else 0
	if tot > d:
		tot = 0
		cnt += 1
print(cnt)


lt = list(input().split())
(n, b, d) = (int(lt[0]), int(lt[1]), int(lt[2]))
lt = list(input().split())
cd = 0
k = 0
for i in range(n):
	lt[i] = int(lt[i])
	if lt[i] > b:
		continue
	cd += lt[i]
	if cd > d:
		k += 1
		cd = 0
print(k)


(n, b, d) = [int(x) for x in input().split()]
cur = 0
count = 0
xs = [int(x) for x in input().split()]
for i in xs:
	if i > b:
		continue
	else:
		cur += i
		if cur > d:
			count += 1
			cur = 0
print(count)


temp = input().split()
NumberOfOranges = int(temp[0])
MaximumSize = int(temp[1])
Container = int(temp[2])
OrangesList = input().split()
for i in range(0, len(OrangesList)):
	OrangesList[i] = int(OrangesList[i])
SumOfJuice = 0
count = 0
for i in range(0, NumberOfOranges):
	if OrangesList[i] <= MaximumSize:
		SumOfJuice += OrangesList[i]
	if SumOfJuice > Container:
		SumOfJuice = 0
		count += 1
print(count)


(n, b, d) = map(int, input().split())
l = list(map(int, input().split()))
l1 = []
for i in range(len(l)):
	if l[i] <= b:
		l1.append(l[i])
	else:
		continue
(s, c) = (0, 0)
for i in range(len(l1)):
	s += l1[i]
	if s <= d:
		c += 0
	else:
		c += 1
		s = 0
print(c)


(n, b, d) = map(int, input().split())
a = list(map(int, input().split()))
(ans, temp) = (0, 0)
for i in range(n):
	if a[i] <= b:
		temp += a[i]
		if temp > d:
			ans += 1
			temp = 0
print(ans)


(n, b, d) = map(int, input().split())
arr = map(int, input().split())
d1 = 0
c = 0
for i in arr:
	if i <= b:
		d1 += i
	if d1 > d:
		c += 1
		d1 = 0
print(c)


[n, b, d] = [int(x) for x in input().split()]
t = [int(x) for x in input().split()]
waste = d
counter = 0
for i in range(0, n):
	if t[i] <= b:
		waste -= t[i]
		if waste < 0:
			counter += 1
			waste = d
print(counter)


def solve():
	(n, b, d) = map(int, input().split())
	ors = map(int, input().split())
	ans = 0
	trs = 0
	for o in ors:
		if o > b:
			continue
		trs += o
		if trs > d:
			ans += 1
			trs = 0
	return ans
print(solve())


(n, b, d) = map(int, input().strip().split(' '))
lst = list(map(int, input().strip().split(' ')))
lst = list(filter(lambda a: a <= b, lst))
s = 0
c = 0
for i in range(len(lst)):
	s += lst[i]
	if s > d:
		c += 1
		s = 0
print(c)


(n, b, d) = input().split()
n = int(n)
b = int(b)
d = int(d)
oranges = input().split()
waste = 0
empt = 0
for i in range(n):
	x = int(oranges[i])
	if x > b:
		continue
	waste += x
	if waste > d:
		waste = 0
		empt += 1
print(empt)


(n, b, d) = map(int, input().split())
ar = map(int, input().split())
count = 0
waste = 0
for x in ar:
	if x <= b:
		if waste + x > d:
			waste = 0
			count += 1
		else:
			waste += x
print(count)


try:
	import math
	(n, b, d) = list(map(int, input().split(' ')))
	a = list(map(int, input().split(' ')))
	u = []
	for i in range(0, len(a)):
		if a[i] <= b:
			u.append(a[i])
	s = 0
	c = 0
	if len(u) > 0:
		for i in range(0, len(u)):
			s += u[i]
			if s > d:
				c += 1
				s = 0
		print(c)
	else:
		print(0)
except:
	pass


(n, b, d) = map(int, input().split())
a = list(map(int, input().split()))
cont = 0
contP = 0
for i in a:
	if i <= b:
		cont += i
	if cont > d:
		contP += 1
		cont = 0
print(contP)


(n, b, d) = map(int, input().split())
o = list(map(int, input().split()))
(waste, times) = (0, 0)
for i in range(n):
	if o[i] <= b:
		waste += o[i]
		if waste > d:
			times += 1
			waste = 0
print(times)


ipt = input().split(' ')
n = int(ipt[0])
b = int(ipt[1])
d = int(ipt[2])
waste = 0
output = 0
a = input().split(' ')
for x in range(n):
	a[x] = int(a[x])
	if a[x] <= b:
		waste += a[x]
		if waste > d:
			waste = 0
			output += 1
print(output)


(n, b, d) = [int(i) for i in input().strip().split()]
a = [int(i) for i in input().strip().split()]
ans = 0
curr_size = 0
for i in range(n):
	if a[i] > b:
		continue
	curr_size += a[i]
	if curr_size > d:
		ans += 1
		curr_size = 0
print(ans)


(n, b, d) = map(int, input().split())
arr = list(map(int, input().split()))
w = 0
c = 0
for i in arr:
	if i <= b:
		w = w + i
	if w > d:
		c += 1
		w = 0
print(c)


(n, b, d) = map(int, input().split())
l = list(map(int, input().split()))
cnt = 0
juice = 0
for i in l:
	if i > b:
		continue
	juice += i
	if juice > d:
		juice = 0
		cnt += 1
print(cnt)


(numberOfOranges, maxSize, capacity) = map(int, input().split())
orangesList = list(map(int, input().split()))
juice = 0
overflow = 0
for orange in orangesList:
	if orange <= maxSize:
		juice += orange
		if juice > capacity:
			overflow += 1
			juice = 0
print(overflow)


(n, b, d) = list(map(int, input().split()))
line = list(map(int, input().split()))
othodes = 0
result = 0
for i in range(n):
	if line[i] <= b:
		othodes += line[i]
	if othodes > d:
		result += 1
		othodes = 0
print(result)


(n, b, d) = map(int, input().split())
x = list(map(int, input().split()))
cnt = 0
done = 0
for o in x:
	if o > b:
		continue
	elif done > d:
		done = 0
		cnt += 1
	done += o
if done > d:
	cnt += 1
print(cnt)


(n, k, m) = map(int, input().split())
c = list(map(int, input().split()))
l = 0
t = 0
for i in range(n):
	if c[i] <= k:
		t += c[i]
	if t > m:
		t = 0
		l += 1
print(l)


(n, b, d) = map(int, input().split())
lis = list(map(int, input().split()))
empty = 0
t1 = 0
t2 = 0
for i in lis:
	if i > b:
		continue
	t1 += i
	if t1 > d:
		empty += 1
		t1 = 0
print(empty)


(n, b, d) = map(int, input().split())
L = list(map(int, input().split()))
r = 0
c = 0
for i in range(n):
	if L[i] <= b:
		c += L[i]
		if c > d:
			r += 1
			c = 0
print(r)


(x, y, z) = map(int, input().split())
a = [int(j) for j in input().split()]
ans = 0
ans_1 = 0
for i in range(x):
	if a[i] <= y:
		ans_1 += a[i]
	if ans_1 > z:
		ans += 1
		ans_1 = 0
print(ans)


(n, b, d) = map(int, input().split())
a = map(int, input().split())
suma = 0
cnt = 0
for i in a:
	if i > b:
		continue
	if suma + i > d:
		suma = 0
		cnt += 1
	else:
		suma += i
print(cnt)


from math import trunc
inputting = list(map(int, input().split()))
n = inputting[0]
b = inputting[1]
d = inputting[2]
oranges = list(map(int, input().split()))
counter = 0
juicing = 0
for i in oranges:
	if i <= b:
		counter += i
	if counter > d:
		juicing += 1
		counter = 0
print(juicing)


(n, b, d) = map(int, input().split())
count = 0
c = 0
x = [int(s) for s in input().split()]
for s in range(n):
	if x[s] <= b:
		c += x[s]
	if c > d:
		count += 1
		c = 0
print(count)


(n, b, d) = [int(i) for i in input().split()]
s = [int(i) for i in input().split()]
res = 0
trash = 0
for i in range(n):
	if s[i] <= b:
		trash += s[i]
		if trash > d:
			trash = 0
			res += 1
print(res)


(n, b, d) = map(int, input().split())
l = [int(i) for i in input().split()]
waste = 0
c = 0
for i in l:
	if i <= b:
		waste += i
	if waste > d:
		c += 1
		waste = 0
print(c)


(n, b, d) = map(int, input().split())
dd = 0
ans = 0
l = list(map(int, input().split()))
for x in l:
	if x > b:
		continue
	dd += x
	if dd > d:
		dd = 0
		ans += 1
print(ans)


(n, b, d) = list(map(int, input().split()))
a = list(map(int, input().split()))
a = [o for o in a if o <= b]
res = 0
mx = 0
for o in a:
	mx += o
	if mx > d:
		mx = 0
		res += 1
print(res)


(n, b, d) = map(int, input().split())
arr = []
s = input().split()
i = 0
while i < n:
	arr.append(int(s[i]))
	i += 1
i = 0
s = 0
cnt = 0
while i < n:
	if arr[i] <= b:
		s += arr[i]
	else:
		i += 1
		continue
	if s > d:
		cnt += 1
		s = 0
	i += 1
print(cnt)


(n, b, d) = map(int, input().split(' '))
ora = list(map(int, input().split(' ')[:n]))
was = 0
cou = 0
i = 0
while i < n:
	if ora[i] > b:
		i += 1
	else:
		cou += ora[i]
		if cou > d:
			was += 1
			cou = 0
		i += 1
print(was)


def number_oprozhneniy(a, b, d):
	sum = 0
	n = 0
	for fruit in a:
		if fruit <= b:
			sum += fruit
			if sum > d:
				sum = 0
				n += 1
	return n
(n, b, d) = map(int, input().split())
a = list(map(int, input().split()))
print(number_oprozhneniy(a, b, d))


class CodeforcesTask709ASolution:

	def __init__(self):
		self.result = ''
		self.n_b_d = []
		self.oranges = []

	def read_input(self):
		self.n_b_d = [int(x) for x in input().split(' ')]
		self.oranges = [int(x) for x in input().split(' ')]

	def process_task(self):
		emp = 0
		cont = 0
		for orange in self.oranges:
			if orange <= self.n_b_d[1]:
				cont += orange
				if cont > self.n_b_d[2]:
					cont = 0
					emp += 1
		self.result = str(emp)

	def get_result(self):
		return self.result
Solution = CodeforcesTask709ASolution()
Solution.read_input()
Solution.process_task()
print(Solution.get_result())


(n, b, d) = map(int, input().split())
a = map(int, input().split())
counter = 0
volumenow = 0
for i in a:
	if i <= b:
		volumenow += i
		if volumenow > d:
			counter += 1
			volumenow = 0
print(counter)


(n, b, d) = map(int, input().split())
oranges = list(map(int, input().split()))
waste = 0
juice = 0
for o in oranges:
	if o <= b:
		juice += o
		if juice > d:
			waste += 1
			juice = 0
print(waste)


p = input().split()
n = int(p[0])
b = int(p[1])
d = int(p[2])
a = input().split()
wst = 0
clr = 0
for item in a:
	if int(item) > b:
		continue
	else:
		wst = wst + int(item)
	if wst > d:
		clr += 1
		wst = 0
	else:
		pass
print(clr)


r = lambda : map(int, input().split())
(a, b, c) = r()
s = 0
z = 0
for i in r():
	if i <= b:
		z += i
		if z > c:
			s += 1
			z = 0
print(s)


(n, b, d) = map(int, input().split())
a = list(map(int, input().split()))
result = 0
sum_a = 0
for el in a:
	if el > b:
		continue
	sum_a += el
	if sum_a > d:
		result += 1
		sum_a = 0
print(result)


x = list(map(int, input().strip().split()))
y = list(map(int, input().strip().split()))
numberofOranges = x[0]
maxsize = x[1]
exceedwaste = x[2]
sum = 0
count = 0
for i in range(numberofOranges):
	if y[i] > maxsize:
		continue
	sum += y[i]
	if sum > exceedwaste:
		sum = 0
		count += 1
print(count)


(n, b, d) = map(int, input().split(' '))
(result, waste) = (0, 0)
for a in map(int, input().split(' ')):
	if a > b:
		continue
	waste += a
	if waste > d:
		waste = 0
		result += 1
print(result)


inp1 = input()
inp11 = inp1.split(' ')
n = int(inp11[0])
b = int(inp11[1])
d = int(inp11[2])
inp2 = input()
inp21 = inp2.split(' ')
a = []
for i in inp21:
	j = int(i)
	a.append(j)
was = 0
emp = 0
for i in a:
	if i <= b:
		was += i
	if was > d:
		was = 0
		emp += 1
print(emp)


read = lambda : map(int, input().split())
(n, b, d) = read()
a = list(read())
cnt = 0
cur = 0
for i in a:
	if i > b:
		continue
	cur += i
	if cur > d:
		cur = 0
		cnt += 1
print(cnt)


(noOfOranges, maxSizeOfOrangeJuicerCanAccept, wasteToBeEmptiedAtTotalOrangeSize) = [int(x) for x in input().split(' ')]
sizeListOfOranges = [int(x) for x in input().split(' ')]
noOfTimesJuicerWasteHasToBeEmptied = 0
totalSizeOfOranges = 0
for orangeSize in sizeListOfOranges:
	if orangeSize <= maxSizeOfOrangeJuicerCanAccept:
		totalSizeOfOranges += orangeSize
		if totalSizeOfOranges > wasteToBeEmptiedAtTotalOrangeSize:
			noOfTimesJuicerWasteHasToBeEmptied += 1
			totalSizeOfOranges = 0
print(noOfTimesJuicerWasteHasToBeEmptied)


(num_oranges, max_size, capacity) = [int(x) for x in input().split()]
oranges = [int(x) for x in input().split()]
temp = capacity
count = 0
for orange in oranges:
	if orange > max_size:
		continue
	else:
		capacity -= orange
	if capacity < 0:
		count += 1
		capacity = temp
print(count)


(n, b, d) = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]
waste = 0
current_waste = 0
for i in range(n):
	if a[i] <= b:
		current_waste += a[i]
		if current_waste > d:
			current_waste = 0
			waste += 1
print(waste)


from sys import *
(n, b, d) = map(int, stdin.readline().split())
o = list(map(int, stdin.readline().split()))
(t, ans) = (0, 0)
for x in o:
	if x <= b:
		t += x
	if t > d:
		ans += 1
		t = 0
print(ans)


(n, b, d) = [int(x) for x in input().split()]
s = [int(x) for x in input().split()]
s1 = []
for i in s:
	if i <= b:
		s1.append(i)
(j, x) = (0, 0)
for i in s1:
	j = j + i
	if j > d:
		j = 0
		x = x + 1
print(x)


(n, b, d) = map(int, input().split())
ins = list(map(int, input().split()))
cont = 0
wast = 0
for i in ins:
	if i > b:
		continue
	cont += i
	if cont > d:
		wast += 1
		cont = 0
print(wast)


(a, b, c) = map(int, input().split())
l = list(map(int, input().split()))
k = 0
d = 0
for i in l:
	if i > b:
		pass
	else:
		k += i
		if k > c:
			d += 1
			k = 0
print(d)


(n, b, d) = [int(x) for x in input().split()]
l = [int(x) for x in input().split()]
res = 0
sum1 = 0
for i in l:
	if i <= b:
		sum1 += i
		if sum1 > d:
			sum1 = 0
			res += 1
print(res)


(n, b, d) = input().strip().split(' ')
(n, b, d) = (int(n), int(b), int(d))
l = list(map(int, input().strip().split(' ')))
s = 0
ans = 0
for i in range(n):
	if l[i] <= b:
		s += l[i]
		if s > d:
			ans += 1
			s = 0
print(ans)


(n, m, k) = map(int, input().split())
apl = [i for i in map(int, input().split()) if i <= m]
(tank, n) = (0, 0)
for i in apl:
	tank += i
	if tank > k:
		tank = 0
		n += 1
print(n)


(n, b, d) = list(map(int, input().split()))
a = list(map(int, input().rstrip().split()))
count = 0
size = 0
for i in a:
	if i > b:
		pass
	else:
		size += i
		if size > d:
			count += 1
			size = 0
print(count)


(n, m, maxOfrecicel) = map(int, input().split())
oranges = list(map(int, input().split()))
numberOfRecicling = 0
inrecicle = 0
for orange in oranges:
	if orange > m:
		continue
	inrecicle += orange
	if inrecicle > maxOfrecicel:
		numberOfRecicling += 1
		inrecicle = 0
print(numberOfRecicling)


(n, b, d) = list(map(int, input().split()))
inp = list(map(int, input().split()))
cntr = 0
sum1 = 0
for i in range(n):
	if inp[i] <= b:
		sum1 += inp[i]
		if sum1 > d:
			cntr += 1
			sum1 = 0
print(cntr)


det = list(map(int, input().split()))
oranges = list(map(int, input().split()))
n = det[0]
max_size = det[1]
waste_section = det[2]
total = 0
times = 0
for i in oranges:
	if i > max_size:
		continue
	else:
		total = total + i
		if total > waste_section:
			times = times + 1
			total = 0
print(times)


p = list(map(int, input().strip().split()))
ls = list(map(int, input().strip().split()))
w = 0
c = 0
for l in ls:
	if l <= p[1]:
		w += l
		if w > p[2]:
			w = 0
			c += 1
print(c)


inn = list(map(int, input().split(' ')))
orngs = list(map(int, input().split(' ')))
mxorg = inn[1]
wstmx = inn[2]
wst = 0
cntr = 0
for each in orngs:
	if each <= mxorg:
		wst = wst + each
		if wst > wstmx:
			wst = 0
			cntr += 1
print(cntr)


(n, b, mx) = input().split(' ')
o = input().split(' ')
Oranges = o[:int(n)]
Sum = 0
count = 0
for i in Oranges:
	if int(i) <= int(b):
		Sum = Sum + int(i)
		if Sum > int(mx):
			Sum = 0
			count = count + 1
print(count)


(num_orange, max_size, waste_cap) = map(int, input().split())
oranges = (x for x in map(int, input().split()) if x <= max_size)
count = 0
waste = 0
for orange in oranges:
	waste += orange
	if waste > waste_cap:
		count += 1
		waste = 0
print(count)


alph = 'abcdefghijklmnopqrstuvwxyz'
(n, b, d) = map(int, input().split())
a = list(map(int, input().split()))
E = 0
ans = 0
for i in range(n):
	if a[i] <= b:
		E += a[i]
		if E > d:
			ans += 1
			E = 0
print(ans)


(n, b, d) = map(int, input().split())
oranges = list(map(int, input().split()))
i = 0
waste = 0
count = 0
while i < n:
	if oranges[i] <= b:
		waste += oranges[i]
	i += 1
	if waste > d:
		count += 1
		waste = 0
print(count)


(n, b, d) = list(map(int, input().split(' ')))
oranges = list(map(int, input().split(' ')))
total = 0
rolling_sum = 0
res = 0
for o in oranges:
	if o <= b:
		total += o
		rolling_sum += o
		if rolling_sum > d:
			rolling_sum = 0
			res += 1
print(res)


(n, b, d) = map(int, input().split())
summa = 0
ans = 0
a = [int(i) for i in input().split()]
for i in a:
	if i <= b:
		summa += i
	if summa > d:
		summa = 0
		ans += 1
print(ans)


(n, b, d) = [int(i) for i in input().split()]
oranges = [int(i) for i in input().split()]
mass = 0
count = 0
for i in oranges:
	if i <= b:
		mass += i
	if mass > d:
		count += 1
		mass = 0
print(count)


(n, m, k) = map(int, input().split())
a = list(map(int, input().split()))
a = [i for i in a if i <= m]
m = 0
n = 0
for i in a:
	m += i
	if m > k:
		m = 0
		n += 1
print(n)


(n, b, d) = list(map(int, input().split()))
a = list(map(int, input().split()))
juice = 0
emptying_count = 0
for i in a:
	if i <= b:
		juice += i
		if juice > d:
			juice = 0
			emptying_count += 1
print(emptying_count)


(n, b, d) = list(map(int, input().split()))
v = 0
cnt = 0
for cur in map(int, input().split()):
	if cur <= b:
		v += cur
		if v > d:
			v = 0
			cnt += 1
print(cnt)


(nb_orange, max_orange, max_waste) = [int(x) for x in input().split()]
empties = 0
oranges = [int(x) for x in input().split()]
juiced = 0
for i in range(nb_orange):
	if oranges[i] <= max_orange:
		juiced += oranges[i]
		if juiced > max_waste:
			empties += 1
			juiced = 0
print(empties)


(n, b, d) = map(int, input().split())
li = [int(x) for x in input().split()]
trash = 0
count = 0
for o in li:
	if o > b:
		continue
	trash += o
	if trash > d:
		count += 1
		trash = 0
print(count)


(n, b, d) = list(map(int, input().split()))
a = list(map(int, input().split()))
ans = 0
curr_val = 0
for a_i in a:
	if a_i > b:
		continue
	curr_val += a_i
	if curr_val > d:
		ans += 1
		curr_val = 0
print(ans)


I = lambda : map(int, input().split())
(n, b, d) = I()
(t, r) = (0, 0)
for i in filter(lambda x: x <= b, I()):
	t += i
	r += t > d
	t *= t <= d
print(r)


(N, B, D) = map(int, input().split())
A = list(map(int, input().split()))
S = 0
SUM = 0
for I in range(N):
	if A[I] <= B:
		SUM += A[I]
		if SUM > D:
			SUM = 0
			S += 1
print(S)


(n, b, d) = map(int, input().split())
ors = list(map(int, input().split()))
tot = 0
t = 0
for i in ors:
	if i <= b:
		tot += i
	if tot > d:
		tot = 0
		t += 1
print(t)


from sys import stdin
(n, b, d) = map(int, input().split())
oranges = list(map(int, stdin.readline().split()))
compteur = 0
section = 0
for orange in oranges:
	if orange <= b:
		section += orange
		if section > d:
			section = 0
			compteur += 1
print(compteur)


(n, b, d) = map(int, input().split())
Orng = list(map(int, input().split()))
(size, times) = (0, 0)
for i in Orng:
	if i <= b:
		size += i
		if size > d:
			times += 1
			size = 0
print(times)


(n, b, d) = map(int, input().split())
l_o = list(map(int, input().split()))
t = 0
t_o = 0
for o in l_o:
	if o <= b:
		t += o
	if t > d:
		t_o += 1
		t = 0
print(t_o)


[n, b, d] = list(map(int, input().split()))
a = list(map(int, input().split()))
cur = 0
res = 0
for x in a:
	if x > b:
		continue
	cur = cur + x
	if cur > d:
		res += 1
		cur = 0
print(res)


n = list(map(int, input().split()))
oranges = list(map(int, input().split()))
empty = []
count = 0
for i in range(0, n[0]):
	if oranges[i] <= n[1]:
		empty.append(oranges[i])
		if sum(empty) > n[2]:
			count += 1
			empty.clear()
print(count)


data = input().split(' ')
data = [int(item) for item in data]
sizes = input().split(' ')
sizes = [int(item) for item in sizes]
waste = 0
entero1 = 2
entero2 = 5
resultado = entero1 / entero2
counter_waste = 0
for item in range(len(sizes)):
	if sizes[item] <= data[1]:
		if sizes[item] + waste > data[2]:
			counter_waste += 1
			waste = 0
		else:
			waste += sizes[item]
print(counter_waste)


(n, b, d) = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]
c = 0
v = 0
for i in range(n):
	if a[i] <= b:
		c += a[i]
		if c > d:
			v += 1
			c = 0
print(v)


(n, b, d) = map(int, input().split())
daf = list(map(int, input().split()))
jum = 0
was = 0
for j in daf:
	if j > b:
		continue
	was += j
	if was > d:
		jum += 1
		was = 0
print(jum)


(n, b, d) = map(int, input().split())
m = list(map(int, input().split()))
a = 0
cnt = 0
for i in range(n):
	if m[i] > b:
		m[i] = 0
	a += m[i]
	if a > d:
		a = 0
		cnt += 1
print(cnt)


(n, b, d) = map(int, input().split())
a = list(map(int, input().split()))
count = 0
_sum = 0
for num in a:
	if num <= b:
		_sum += num
		if _sum > d:
			_sum = 0
			count += 1
print(count)


import sys
(n, b, d) = map(int, input().split())
a = list(map(int, sys.stdin.read().split()))
res = 0
garbage = 0
for ai in a:
	if ai > b:
		continue
	garbage += ai
	if garbage > d:
		res += 1
		garbage = 0
print(res)


import math as mt
import sys
from collections import *
inf = float('inf')

def ii():
	return int(input())

def mii():
	return map(int, input().split())

def lii():
	return list(map(int, input().split()))

def gmat(n, m):
	return [[0] * m for _ in range(n)]

def imat(n):
	return [list(mii()) for _ in range(n)]
try:
	sys.stdin = open('a.in', 'r')
	input = sys.stdin.readline
except:
	pass
(a, b, c) = mii()
aps = lii()
(f, s) = (0, 0)
for i in aps:
	if i <= b:
		s += i
	else:
		continue
	if s > c:
		s = 0
		f += 1
print(f)


(a, b, c) = [int(i) for i in input().split()]
l = [int(i) for i in input().split()]
t = 0
k = 0
for i in range(a):
	if l[i] <= b:
		k = k + l[i]
	if k > c:
		t = t + 1
		k = 0
print(t)


(n, b, d) = map(int, input().split())
A = list(map(int, input().split()))
counter = 0
bag = 0
for i in range(n):
	if A[i] <= b:
		bag += A[i]
		if bag > d:
			counter += 1
			bag = 0
print(counter)


(n, b, d) = list(map(int, input().split()))
a = list(map(int, input().split()))
sum = 0
count = 0
for x in a:
	if x <= b:
		sum = sum + x
		if sum <= d:
			continue
		else:
			count = count + 1
			sum = 0
print(count)


(n, b, d) = map(int, input().split())
waste = 0
ans = 0
l = list(map(int, input().split()))
for i in l:
	if i > b:
		continue
	else:
		waste += i
		if waste <= d:
			continue
		else:
			ans += 1
			waste = 0
print(ans)


list1 = input().strip().split(' ')
list2 = input().strip().split(' ')
waste = 0
n = 0
for i in list2:
	if int(i) > int(list1[1]):
		continue
	waste += int(i)
	if waste > int(list1[2]):
		waste = 0
		n += 1
print(n)


(n, b, d) = list(map(int, input().split()))
a = list(map(int, input().split()))
s = 0
x = 0
for i in range(0, n):
	if a[i] > b:
		continue
	else:
		s += a[i]
	if s > d:
		s = 0
		x += 1
	else:
		continue
print(x)


def main():
	[n, b, d] = [int(_) for _ in input().split()]
	orange_sizes = [int(_) for _ in input().split()]
	current_total = 0
	count_cleaning = 0
	for o in orange_sizes:
		if o > b:
			continue
		current_total += o
		if current_total > d:
			count_cleaning += 1
			current_total = 0
	print(count_cleaning)
main()


(n, b, d) = input().split()
a = [int(i) for i in input().split()]
wast = 0
w = 0
for i in a:
	if i <= int(b):
		w += i
		if w > int(d):
			wast += 1
			w = 0
print(wast)


(n, b, d) = [int(h) for h in input().split()]
sizes = [int(j) for j in input().split()]
tank = 0
res = 0
for orange in sizes:
	if orange > b:
		continue
	tank += orange
	if tank > d:
		res += 1
		tank = 0
print(res)


import math
(n, b, d) = map(int, input().split())
a = [*map(int, input().split())]
num = d
count = 0
for i in range(n):
	if a[i] <= b:
		num -= a[i]
	if num < 0:
		count += 1
		num = d
print(count)


inp = input().split()
n = int(inp[0])
b = int(inp[1])
d = int(inp[2])
arr = []
inp1 = input().split()
for i in range(len(inp1)):
	arr.append(int(inp1[i]))
ts = 0
count = 0
for i in range(n):
	if arr[i] <= b:
		ts = ts + arr[i]
	if ts > d:
		ts = 0
		count += 1
print(count)


(n, b, d) = [int(g) for g in input().split()]
a = [int(f) for f in input().split()]
x = 0
f = 0
for i in a:
	if i <= b:
		x += i
	if x > d:
		f += 1
		x = 0
print(f)


(n, b, d) = map(int, input().split())
l = list(map(int, input().split()))
count = 0
sum = 0
for x in l:
	if x <= b:
		sum = sum + x
		if sum > d:
			count += 1
			sum = 0
print(count)


(n, b, d) = map(int, input().split())
a = [int(i) for i in input().split()]
k = h = 0
for i in range(n):
	if a[i] <= b:
		k += a[i]
		if k > d:
			k = 0
			h += 1
print(h)


(n, b, d) = list(map(int, input().split()))
a = list(map(int, input().split()))
dd = 0
ans = 0
for ai in a:
	if ai <= b:
		dd += ai
	if dd > d:
		ans += 1
		dd = 0
print(ans)


(n, b, d) = [int(c) for c in input().split()]
sizes = [i for i in map(int, input().split()) if i <= b]
acc = 0
res = 0
for e in sizes:
	acc += e
	if acc > d:
		res += 1
		acc = 0
print(res)


(n, b, d) = map(int, input().split())
l = [int(x) for x in input().split()]
(sm, e) = (0, 0)
for i in l:
	if i <= b:
		sm += i
	if sm > d:
		e += 1
		sm = 0
print(e)


(n, b, d) = input().split(' ')
size = int(b)
refill = int(d)
second = [int(i) for i in input().split(' ')]
sum1 = 0
sum2 = 0
count = 0
for i in second:
	if i <= size:
		sum1 += i
		sum2 += i
	if sum2 > refill:
		sum2 = 0
		count += 1
print(count)


(n, b, d) = map(int, input().split())
arr = [int(x) for x in input().split()]
total_size = 0
waste_empty = 0
for i in arr:
	if i <= b:
		total_size += i
		if total_size > d:
			waste_empty += 1
			total_size = 0
print(waste_empty)


x = list(map(int, input().split(' ')))
juice = list(map(int, input().split(' ')))
(n, tank) = (0, 0)
for i in juice:
	if i <= x[1]:
		tank += i
		if tank > x[2]:
			n += 1
			tank = 0
print(n)


def juicer(inp, oranges):
	max_orng = inp[1]
	max_blend = inp[2]
	counter = 0
	blender = 0
	for i in oranges:
		if i > max_orng:
			continue
		if blender + i <= max_blend:
			blender += i
		else:
			counter += 1
			blender = 0
	return counter
inp = list(map(int, input().rstrip().split()))
oranges = list(map(int, input().rstrip().split()))
print(juicer(inp, oranges))


s = input()
s = s.split()
n = int(s[0])
b = int(s[1])
d = int(s[2])
a = input()
a = a.split()
c = 0
size = 0
for i in range(n):
	a[i] = int(a[i])
for i in range(n):
	if a[i] > b:
		continue
	else:
		size += a[i]
		if size > d:
			c += 1
			size = 0
print(c)


(x, y, z) = map(int, input().split())
s = list(map(int, input().split()))
c = 0
f = 0
for n in range(x):
	if y < s[n]:
		continue
	else:
		c = c + s[n]
		if c <= z:
			f = f
		elif c > z:
			c = 0
			f = f + 1
print(f)


nums = list(map(int, input().split()))
sizes = list(map(int, input().split()))
num_oranges = nums[0]
max_size = nums[1]
limit = nums[2]
tank = 0
count = 0
for i in range(0, num_oranges):
	if sizes[i] > max_size:
		continue
	tank += sizes[i]
	if tank > limit:
		tank = 0
		count += 1
print(count)


(n, b, d) = map(int, input().split())
max_size = 0
count = 0
for orange in list(map(int, input().split())):
	if orange <= b:
		max_size += orange
	if max_size > d:
		count += 1
		max_size = 0
print(count)


nbd = list(map(int, input().split()))
oranges = list(map(int, input().split()))
numTimesEmptied = 0
total = 0
for orange in oranges:
	if orange <= nbd[1]:
		total += orange
		if total > nbd[2]:
			numTimesEmptied += 1
			total = 0
print(numTimesEmptied)


(a, b, c) = map(int, input().split())
d = list(map(int, input().split()))
s = 0
x = 0
for i in range(len(d)):
	if d[i] <= b:
		s = s + d[i]
		if s > c:
			x = x + 1
			s = 0
print(x)


t = [int(x) for x in input().split(' ')]
n = [int(x) for x in input().split(' ')]
count = 0
w = 0
for i in n:
	if i > t[1]:
		continue
	else:
		w += i
	if w > t[2]:
		count += 1
		w = 0
print(count)


(n, b, d) = list(map(int, input().split()))
x = list(map(int, input().split()))
x_without_b = []
sum_of_orange = 0
count = 0
for i in range(len(x)):
	if x[i] <= b:
		x_without_b.append(x[i])
for j in range(len(x_without_b)):
	sum_of_orange += x_without_b[j]
	if sum_of_orange > d:
		count += 1
		sum_of_orange = 0
print(count)


(n, b, d) = map(int, input().split())
orange = list(map(int, input().split()))
mixer = 0
result = 0
for o in orange:
	if o <= b:
		mixer += o
		if mixer > d:
			mixer = 0
			result += 1
print(result)


a = input().split(' ')
b = input().split(' ')
(juicer, refill) = (0, 0)
for x in range(int(a[0])):
	if int(b[x]) <= int(a[1]):
		juicer += int(b[x])
		if juicer > int(a[2]):
			juicer = 0
			refill += 1
print(refill)


(n, b, d) = list(map(int, input().split(' ')))
sizeOranges = [int(x) for x in input().split(' ')]
count = countEmpty = 0
for i in sizeOranges:
	if i <= b:
		count += i
	if count > d:
		countEmpty += 1
		count = 0
print(countEmpty)


(n, b, d) = map(int, input().split())
a = list(map(int, input().split()))
empties = 0
waste = 0
for e in a:
	if e > b:
		continue
	waste += e
	if waste > d:
		empties += 1
		waste = 0
print(empties)


(n, b, d) = map(int, input().split())
a = [int(i) for i in input().split()]
sum = 0
out = 0
for j in a:
	if j <= b:
		sum += j
		if sum > d:
			out += 1
			sum = 0
print(out)


(a, b, d) = map(int, input().split())
c = list(map(int, input().split()))
sum = 0
res = 0
for i in c:
	if i <= b:
		sum += i
	if sum > d:
		res += 1
		sum = 0
print(res)


(n, b, c) = list(map(int, input().split()))
juc = list(map(int, input().split()))
(x, j) = (0, 0)
for i in juc:
	if i <= b:
		x += i
		if x > c:
			j += 1
			x = 0
print(j)


def solve():
	(n, b, d) = map(int, input().split())
	sizes = [int(i) for i in input().split()]
	juc = 0
	waste = 0
	for s in sizes:
		if s <= b:
			juc += s
		if juc > d:
			juc = 0
			waste += 1
	print(waste)
solve()


import sys
input = sys.stdin.readline
(n, b, d) = list(map(int, input().split()))
a = list(map(int, input().split()))
s = 0
c = 0
for i in range(n):
	if a[i] <= b:
		s += a[i]
	if s > d:
		s = 0
		c += 1
print(c)


x = input().split()
n = int(x[0])
b = int(x[1])
d = int(x[2])
a = input().split()
tot_size = 0
count = 0
for i in range(n):
	if int(a[i]) <= b:
		tot_size += int(a[i])
		if tot_size > d:
			count += 1
			tot_size = 0
		else:
			continue
print(count)


(n, b, d) = map(int, input().split())
a = map(int, input().split())
(w, c) = (0, 0)
for i in a:
	if i <= b:
		w += i
		if w > d:
			c += 1
			w = 0
print(c)


(n, b, d) = map(int, input().split())
t = 0
w = 0
l = list(map(int, input().split()))
for i in range(n):
	if l[i] > b:
		continue
	else:
		w += l[i]
	if w > d:
		t += 1
		w = 0
print(t)


str0 = [int(i) for i in input().split()]
n = str0[0]
b = str0[1]
d = str0[2]
ass = [int(i) for i in input().split()]
total = 0
counter = 0
for i in ass:
	if i > b:
		continue
	total += i
	if total > d:
		total = 0
		counter += 1
print(counter)


(n, b, d) = [int(x) for x in input('').split()]
a = [int(x) for x in input('').split()]
currJuice = 0
ans = 0
for i in a:
	if i <= b:
		currJuice += i
	if currJuice > d:
		ans += 1
		currJuice = 0
print(ans)


(n, b, d) = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]
s = 0
k = 0
for i in range(n):
	if a[i] <= b:
		s += a[i]
		if s > d:
			k += 1
			s = 0
print(k)


s = input().split()
n = int(s[0])
b = int(s[1])
d = int(s[2])
k = input().split()
a = 0
p = 0
for i in k:
	if int(i) <= b:
		p += int(i)
		if p > d:
			a += 1
			p = 0
print(a)


(n, b, d) = map(int, input().split())
arr = [int(x) for x in input().split()]
waste = 0
count = 0
for val in arr:
	if val <= b:
		waste += val
		if waste > d:
			count += 1
			waste = 0
print(count)


x = list(map(int, input().split()))
O = list(map(int, input().split()))
Count = 0
Waste = 0
for i in range(len(O)):
	Waste += O[i] if O[i] <= x[1] else 0
	if Waste > x[2]:
		Count += 1
		Waste = 0
print(Count)


(n, b, d) = map(int, input().split())
a = list(map(int, input().split()))
(res, t) = (0, 0)
for i in a:
	if i <= b:
		t += i
		if t > d:
			t = 0
			res += 1
print(res)


(n, b, d) = map(int, input().split())
a = list(map(int, input().split()))
c = 0
sum = 0
for i in range(len(a)):
	if a[i] <= b:
		sum += a[i]
		if sum > d:
			sum = 0
			c += 1
print(c)


import sys
fin = sys.stdin
fout = sys.stdout
(n, b, d) = map(int, fin.readline().split())
a = list(map(int, fin.readline().split()))
summ = 0
count = 0
for cur in a:
	if cur > b:
		continue
	summ += cur
	if summ > d:
		count += 1
		summ = 0
fout.write(str(count))


temp = [int(x) for x in input().split()]
n = temp[0]
b = temp[1]
d = temp[2]
a = [int(x) for x in input().split()]
B = 0
counter = 0
for i in range(n):
	if a[i] <= b:
		B += a[i]
		if B > b:
			if B > d:
				counter += 1
				B = 0
print(counter)


(n, b, d) = [int(s) for s in input().split()]
a = [int(s) for s in input().split()]
arr = []
for i in a:
	if i <= b:
		arr.append(i)
waste = 0
counter = 0
for i in range(len(arr)):
	waste += arr[i]
	if waste > d:
		counter += 1
		waste = 0
print(counter)


import math
(n, b, d) = (int(i) for i in input().split())
l = [int(i) for i in input().split()]
s = 0
c = 0
for i in range(n):
	if l[i] <= b:
		s += l[i]
		if s > d:
			c += 1
			s = 0
print(c)


(n, b, d) = list(map(int, input().split()))
l = list(map(int, input().rstrip().split()))
s = 0
c = 0
for i in range(0, len(l)):
	if l[i] <= b:
		s += l[i]
	if s > d:
		c += 1
		s = 0
print(c)


(a, b, c) = map(int, input().split())
li = list(map(int, input().split()))
countt = 0
jus_wast = 0
for i in li:
	if i <= b:
		jus_wast += i
		if jus_wast <= c:
			pass
		else:
			jus_wast = 0
			countt += 1
print(countt)


s = 0
from math import ceil
(n, b, d) = map(int, input().split())
ans = 0
l = list(map(int, input().split()))
for i in range(n):
	if l[i] <= b:
		s += l[i]
	if s > d:
		ans += 1
		s = 0
print(ans)


(n, b, d) = [int(i) for i in input().split()]
c = 0
answer = 0
a = [int(i) for i in input().split()]
for i in range(len(a)):
	if a[i] <= b:
		c += a[i]
		if c > d:
			answer += 1
			c = 0
print(answer)


import sys
c = 0
m = 0
i = 0
(n, b, d) = input().split()
x = list((int(num) for num in input().split()))
while i < int(n):
	if x[i] <= int(b):
		c = c + x[i]
	if c > int(d):
		m += 1
		c = 0
	i += 1
print(m)


(n, b, d) = map(int, input().split())
arr = list(map(int, input().split()))[:n]
sum = 0
empty = 0
for org in arr:
	if org > b:
		continue
	else:
		sum += org
		if sum > d:
			empty += 1
			sum = 0
if sum > d:
	sum = 0
	empty += 1
print(empty)


import math
a = list(map(int, input().split()))
b = list(map(int, input().split()))
cnt = 0
n = a[0]
mx = a[1]
d = a[2]
sum = 0
for i in range(len(b)):
	if b[i] <= mx:
		sum = sum + b[i]
		if sum > d:
			sum = 0
			cnt = cnt + 1
print(cnt)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def main():
	(n, b, d) = LI()
	a = LI()
	r = 0
	t = 0
	for c in a:
		if c > b:
			continue
		t += c
		if t > d:
			r += 1
			t = 0
	return r
print(main())


(n, d, m) = map(int, input().split())
l = list(map(int, input().split()))
s = 0
c = 0
for i in range(n):
	if l[i] <= d:
		s = s + l[i]
	if s > m:
		s = 0
		c = c + 1
print(c)


(n, b, d) = map(int, input().split())
a = [int(x) for x in input().split()]
c = 0
total = 0
for i in a:
	if i <= b:
		total += i
	if total > d:
		total = 0
		c += 1
print(c)


(n, b, d) = str(input()).split()
n = int(n)
b = int(b)
d = int(d)
line = str(input()).split()
line = [int(it) for it in line]
num = 0
temp_sum = 0
for it in line:
	if not it > b:
		temp_sum += it
	if temp_sum > d:
		num += 1
		temp_sum = 0
print(num)


import sys
(n, b, d) = map(int, sys.stdin.readline().split())
arr = sys.stdin.readline().strip().split()
arr = [int(x) for x in arr]

def howMany(n, b, d, arr):
	ans = 0
	juice = 0
	for orange in arr:
		if orange <= b:
			juice += orange
			if juice > d:
				juice = 0
				ans += 1
	return ans

def doTest():
	assert howMany(2, 7, 10, [5, 6]) == 1
	assert howMany(1, 5, 10, [7]) == 0
	assert howMany(3, 10, 10, [5, 7, 7]) == 1
	assert howMany(1, 1, 1, [1]) == 0
print(howMany(n, b, d, arr))


def translation():
	word_1 = input()
	word_2 = input()[::-1]
	print(['NO', 'YES'][word_1 == word_2])
	return

def anton_and_danik():
	games = int(input())
	wins = input()
	anton_wins = sum((i == 'A' for i in wins))
	if anton_wins * 2 > len(wins):
		print('Anton')
	elif anton_wins * 2 == len(wins):
		print('Friendship')
	else:
		print('Danik')
	return

def acoomodation():
	cnt = 0
	for _ in range(int(input())):
		(p, q) = map(int, input().split())
		if q - p >= 2:
			cnt += 1
	print(cnt)
	return

def juicer():
	(n, b, d) = map(int, input().split())
	sum_orange = 0
	cnt_empty = 0
	for orange in list(map(int, input().split())):
		if orange <= b:
			sum_orange += orange
			if sum_orange > d:
				cnt_empty += 1
				sum_orange = 0
	print(cnt_empty)
	return
juicer()


from sys import stdin
(n, b, d) = (int(x) for x in stdin.readline().split())
a = list((int(x) for x in stdin.readline().split()))
container = 0
result = 0
for orange in a:
	if orange > b:
		continue
	container += orange
	if container > d:
		result += 1
		container = 0
print(result)


(n, b, d) = map(int, input().split())
a = map(int, input().split())
litter = 0
summ = 0
for i in a:
	if i > b:
		pass
	else:
		summ += i
		if summ > d:
			summ = 0
			litter += 1
print(litter)


li = list(map(int, input().split(' ')))
l = list(map(int, input().split(' ')))
i = 0
while i < li[0]:
	if l[i] > li[1]:
		l[i] = 0
	i = i + 1
s = 0
k = 0
i = 0
while i < len(l):
	s = s + l[i]
	if s > li[2]:
		s = 0
		k = k + 1
	i = i + 1
print(k)


(n, b, d) = map(int, input().split())
oranges = list(map(int, input().split()))
x = 0
y = 0
for i in oranges:
	if i <= b:
		x += i
	if x > d:
		x = 0
		y += 1
print(y)


(n, b, d) = map(int, input().split())
size = list(map(int, list(input().split())))
total = 0
c = 0
for i in range(len(size)):
	if size[i] <= b:
		total += size[i]
	if total > d:
		total = 0
		c += 1
print(c)


(n, b, d) = map(int, input().split())
p = list(map(int, input().split()))
(c, t) = (0, 0)
for i in p:
	if i <= b:
		c += i
	if c > d:
		c = 0
		t += 1
print(t)


(nx, bx, dx) = input().split()
a = list(map(int, input().split()))
n = int(nx)
b = int(bx)
d = int(dx)
s = 0
c = 0
for i in range(int(n)):
	if not a[i] > b:
		s += a[i]
		if s > d:
			c += 1
			s = 0
print(c)


(n, b, d) = map(int, input().split())
x = [int(x) for x in input().split()]
s = c = 0
for i in x:
	if i <= b:
		s += i
		if s > d:
			c += 1
			s = 0
print(c)


from __future__ import division, print_function
import sys
from sys import stdin, stdout
import bisect
from bisect import bisect_left as bl
from bisect import bisect_right as br
import itertools
from collections import Counter
import collections
import math
import heapq
import re

def modinv(n, p):
	return pow(n, p - 2, p)

def cin():
	return map(int, sin().split())

def ain():
	return list(map(int, sin().split()))

def sin():
	return input()

def inin():
	return int(input())

def Divisors(n):
	l = []
	for i in range(1, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
	return l

def most_frequent(list):
	return max(set(list), key=list.count)

def GCD(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def ncr(n, r, p):
	t = fact[n] * (ifact[r] * ifact[n - r] % p) % p
	return t

def Convert(string):
	li = list(string.split(''))
	return li

def SieveOfEratosthenes(n):
	global prime
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	f = []
	for p in range(2, n):
		if prime[p]:
			f.append(p)
	return f
prime = []
q = []

def dfs(n, d, v, c):
	global q
	v[n] = 1
	x = d[n]
	q.append(n)
	j = c
	for i in x:
		if i not in v:
			f = dfs(i, d, v, c + 1)
			j = max(j, f)
	return j

def main():
	a = ain()
	c = ain()
	n = a[0]
	b = a[1]
	d = a[2]
	count = 0
	temp = 0
	for i in range(n + 1):
		if temp > d:
			temp = 0
			count += 1
			if i == n:
				break
		if i != n:
			if c[i] <= b:
				temp += c[i]
	print(count)
py2 = round(0.5)
if py2:
	from future_builtins import ascii, filter, hex, map, oct, zip
	range = xrange
import os, sys
from io import IOBase, BytesIO
BUFSIZE = 8192

class FastIO(BytesIO):
	newlines = 0

	def __init__(self, file):
		self._file = file
		self._fd = file.fileno()
		self.writable = 'x' in file.mode or 'w' in file.mode
		self.write = super(FastIO, self).write if self.writable else None

	def _fill(self):
		s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
		self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
		return s

	def read(self):
		while self._fill():
			pass
		return super(FastIO, self).read()

	def readline(self):
		while self.newlines == 0:
			s = self._fill()
			self.newlines = s.count(b'\n') + (not s)
		self.newlines -= 1
		return super(FastIO, self).readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.getvalue())
			(self.truncate(0), self.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		if py2:
			self.write = self.buffer.write
			self.read = self.buffer.read
			self.readline = self.buffer.readline
		else:
			self.write = lambda s: self.buffer.write(s.encode('ascii'))
			self.read = lambda : self.buffer.read().decode('ascii')
			self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


k = 0
(n, a, b) = map(int, input().split())
l = list(map(int, input().split()))
r = 0
for i in range(n):
	if l[i] <= a:
		r = r + l[i]
	if r > b:
		k = k + 1
		r = 0
print(k)


(n, b, d) = [int(x) for x in input().split(' ')]
a = [int(x) for x in input().split(' ')]
j = 0
overflows = 0
for f in a:
	if f <= b:
		j += f
	if j > d:
		j = 0
		overflows += 1
print(overflows)


(n, b, d) = map(int, input().split())
laranjas = []
limpeza = 0
waste = 0
for i in input().split():
	laranjas.append(int(i))
if min(laranjas) > b:
	print(0)
else:
	for size in laranjas:
		if size <= b:
			waste += size
		if waste > d:
			limpeza += 1
			waste = 0
	print(limpeza)


(n, b, d) = map(int, input().split())
a = list(map(int, input().split()))
s = 0
num = 0
for i in range(n):
	if a[i] <= b:
		s += a[i]
		if s > d:
			num += 1
			s = 0
print(num)


from collections import defaultdict
import sys, os, math
(n, b, d) = map(int, input().split())
arr = list(map(int, input().split()))
(cnt, sm) = (0, 0)
for i in arr:
	if i > b:
		continue
	sm += i
	if sm > d:
		sm = 0
		cnt += 1
print(cnt)


(n, b, d) = map(int, input().split())
items = list(map(int, input().strip().split()))[:n]
waste = 0
c = 0
for i in range(n):
	if items[i] <= b:
		waste += items[i]
	if waste > d:
		c += 1
		waste = 0
print(c)


(n, b, d) = [int(s) for s in input().split()]
oranges = [int(s) for s in input().split()]
pulp = 0
empty = 0
for i in range(n):
	if oranges[i] <= b:
		pulp += oranges[i]
		if pulp > d:
			pulp = 0
			empty += 1
print(empty)


(n, b, d) = map(int, input().split())
array = list(map(int, input().split()))
count = 0
total = 0
for i in array:
	if i <= b:
		total += i
	if d < total:
		count += 1
		total = 0
print(count)


(n, b, d) = map(int, input().split())
a = list(map(int, input().split()))
(q, k) = (0, 0)
for i in range(n):
	if a[i] > b:
		continue
	else:
		k += a[i]
		if k > d:
			q += 1
			k = 0
print(q)


def solve(arr, h, d):
	sums = 0
	count = 0
	for i in arr:
		if i <= h:
			sums += i
		if sums > d:
			count += 1
			sums = 0
	print(count)
(n, h, d) = input().split()
arr = input().split()
arr = [int(x) for x in arr]
solve(arr, int(h), int(d))


import math
(n, b, d) = [int(x) for x in input().split()]
totOrangesSizes = [int(x) for x in input().split()]
totalEmptyingOperations = 0
currWasteSize = 0
for i in range(len(totOrangesSizes)):
	if totOrangesSizes[i] <= b:
		currWasteSize += totOrangesSizes[i]
		if currWasteSize > d:
			totalEmptyingOperations += 1
			currWasteSize = 0
print(totalEmptyingOperations)


(n, b, d) = map(int, input().split(' '))
a = map(int, input().split(' '))
e = w = 0
for an in a:
	if an > b:
		continue
	w += an
	if w > d:
		e += 1
		w = 0
print(e)


(n, b, d) = map(int, input().split())
l = list(map(int, input().split()))
l = [e for e in l if e <= b]
n = len(l)
c = 0
ac = 0
for i in range(n):
	ac += l[i]
	if ac > d:
		ac = 0
		c += 1
print(c)


conditions = list(map(int, input().rstrip().split()))
number_of_oranges = conditions[0]
max_orange_size = conditions[1]
waste_section_max_size = conditions[2]
oranges = list(map(int, input().rstrip().split()))
waste_section_clear_times = 0
total_oranges_sum = 0
for i in oranges:
	if i > max_orange_size:
		continue
	total_oranges_sum += i
	if total_oranges_sum > waste_section_max_size:
		waste_section_clear_times += 1
		total_oranges_sum = 0
print(waste_section_clear_times)


(n, b, d) = map(int, input().split())
oranges = list(map(int, input().split()))
count = 0
currentSum = 0
for x in oranges:
	if x <= b:
		currentSum += x
		if currentSum > d:
			currentSum = 0
			count += 1
print(count)


(OrangeNo, Maxi, d) = [int(x) for x in input().split()]
OrStr = [int(y) for y in input().split()]
Total = 0
Empty = 0
for i in range(OrangeNo):
	if OrStr[i] <= Maxi:
		Total += OrStr[i]
		if Total > d:
			Empty += 1
			Total = 0
print(Empty)


(a, b, d) = map(int, input().split())
ar = [int(x) for x in input().split()]
(sum, n) = (0, 0)
for i in ar:
	if i > b:
		continue
	n += i
	if n > d:
		n = 0
		sum += 1
print(sum)


s1 = [int(i) for i in input().split()]
n = s1[0]
b = s1[1]
d = s1[2]
c1 = 0
c2 = 0
s2 = [int(i) for i in input().split()]
for i in range(n):
	if s2[i] <= b:
		c1 += s2[i]
		if c1 > d:
			c2 += 1
			c1 = 0
print(c2)


(a, b, c) = map(int, input().split())
L = list(map(int, input().split()))
ans = 0
sum = 0
for i in L:
	if i <= b:
		sum += i
	if sum > c:
		ans += 1
		sum = 0
print(ans)


(n, p, d) = map(int, input().split())
l = list(filter(lambda x: int(x) <= p, input().split()))
ans = 0
a = 0
if len(l) > 0:
	for i in l:
		a += int(i)
		if a > d:
			ans += 1
			a = 0
print(ans)


(n, b, d) = list(map(int, input().strip().split()))
vals = list(map(int, input().strip().split()))
(total, ans) = (0, 0)
for val in vals:
	if val <= b:
		total += val
		if total > d:
			ans += 1
			total = 0
if total > d:
	ans += 1
	total = 0
print(ans)


o = input().split()
n = int(o[0])
b = int(o[1])
d = int(o[2])
summa = 0
res = 0
i = input().split()
for y in range(n):
	a = int(i[y])
	if b >= a:
		summa += a
		if summa > d:
			summa = 0
			res += 1
print(res)


(n, b, d) = map(int, input().split())
z = [*map(int, input().split())]
total = 0
cnt = 0
for x in z:
	total += 0 if x > b else x
	if total > d:
		cnt += 1
		total = 0
print(cnt)


(a, b, c) = map(int, input().split())
x = [int(x) for x in input().split()]
cnt = waste = 0
for i in x:
	if i <= b:
		waste = waste + i
	if waste > c:
		cnt += 1
		waste = 0
print(cnt)


parametrs = list(map(int, input().split()))
n = parametrs[0]
b = parametrs[1]
d = parametrs[2]
a = list(map(int, input().split()))
i = 0
kolotxod = 0
schet = 0
while i < n:
	if a[i] <= b:
		kolotxod += a[i]
		if kolotxod > d:
			schet += 1
			kolotxod = 0
	i += 1
print(schet)


(n, b, d) = map(int, input().split())
counter = 0
juiceInjar = 0
inputs = list(input().split())
for i in range(n):
	inputs[i] = int(inputs[i])
for i in inputs:
	if i <= b:
		juiceInjar += i
		if juiceInjar > d:
			counter += 1
			juiceInjar = 0
print(counter)


nandbandd = [int(i) for i in input().split()]
n = nandbandd[0]
b = nandbandd[1]
d = nandbandd[2]
aser = [int(i) for i in input().split()]
khalat = 0
no_of_wastes = 0
for i in range(n):
	if aser[i] > b:
		continue
	else:
		khalat += aser[i]
	if khalat > d:
		khalat = 0
		no_of_wastes += 1
print(no_of_wastes)


(n, b, d) = map(int, input().split())
l = list(map(int, input().split()))
a = []
count = 0
summ = 0
for i in l:
	if i <= b:
		a.append(i)
		summ += i
		if summ > d:
			count += 1
			summ = 0
print(count)


(n, b, d) = list(map(int, input().split()))
a = map(int, input().split())
count = 0
g = 0
for o in a:
	if o <= b:
		g += o
		if g > d:
			count += 1
			g = 0
print(count)


first_line = [int(i) for i in input().split()]
sizes = [int(i) for i in input().split()]
d = first_line[2]
waste = 0
time = 0
for i in range(first_line[0]):
	waste += sizes[i]
	if sizes[i] > first_line[1]:
		waste -= sizes[i]
	elif waste > d:
		waste = 0
		time += 1
print(time)


n = input().split()
s = input().split()
x = 0
a = 0
for i in range(int(n[0])):
	if int(s[i]) <= int(n[1]):
		x += int(s[i])
		if x > int(n[2]):
			a += 1
			x = 0
print(a)


(n, b, d) = list(map(int, input().split(' ')))
a = list(map(int, input().split(' ')))
level = 0
overflows = 0
for ai in a:
	if ai > b:
		continue
	level += ai
	if level > d:
		overflows += 1
		level = 0
print(overflows)


(n, b, d) = map(int, input().split())
A = list(map(int, input().split()))
answer = 0
bal = 0
for i in range(n):
	if A[i] <= b:
		bal += A[i]
		if bal > d:
			bal = 0
			answer += 1
print(answer)


(n, b, d) = map(int, input().split())
a = list(map(int, input().split()))
count = 0
x = 0
for i in range(0, len(a)):
	if a[i] <= b:
		x = x + a[i]
		if x > d:
			count += 1
			x = 0
print(count)


(n, b, d) = map(int, input().split())
x = list(map(int, input().split()))
ans = 0
cur = 0
for i in range(n):
	if x[i] <= b:
		cur += x[i]
	if cur > d:
		ans += 1
		cur = 0
print(ans)


(n, b, d) = list(map(int, input().split()))
oranges = list(map(int, input().split()))
cic = 0
co = 0
for o in oranges:
	if o <= b:
		cic += o
	if cic > d:
		cic = 0
		co += 1
print(co)


def start():
	emptied_num = 0
	juicer = 0
	firstlist = [int(i) for i in input().split(' ')]
	n = firstlist[0]
	b = firstlist[1]
	d = firstlist[2]
	orangelist = [int(i) for i in input().split(' ')]
	for orange in orangelist:
		if orange <= b:
			juicer += orange
			if juicer > d:
				emptied_num += 1
				juicer = 0
	print(emptied_num)
start()


(n, b, d) = map(int, input().split())
ai = list(map(int, input().split()))
num = 0
ans = 0
for i in range(n):
	if ai[i] > b:
		continue
	num += ai[i]
	if num > d:
		ans += 1
		num = 0
print(ans)


(_, b, d) = map(int, input().split())
l = map(int, input().split())
(w, c) = (0, 0)
for i in l:
	if i <= b:
		w += i
		if w > d:
			w = 0
			c += 1
print(c)


(n, b, d) = map(int, input().split())
(res, waste) = (0, 0)
for i in map(int, input().split()):
	if waste > d:
		res += 1
		waste = 0
	if i <= b:
		waste += i
if waste > d:
	res += 1
print(res)


(n, b, d) = list(map(int, input().split()))
arr = list(map(int, input().split()))
ans = 0
sm = 0
for item in arr:
	if sm > d:
		sm = 0
		ans += 1
	if item <= b:
		sm += item
if sm > d:
	ans += 1
print(ans)


(num_oranges, max_size, volume_glass) = map(int, input().split())
oranges = list(map(int, input().split()))
full_glass = 0
origin_glass = volume_glass
index = 0
for index in range(num_oranges):
	if max_size >= oranges[index]:
		volume_glass -= oranges[index]
		if volume_glass < 0:
			volume_glass = origin_glass
			full_glass += 1
print(full_glass)


(n, b, d) = map(int, input().split())
s = list(map(int, input().split()))
c = 0
z = 0
for i in s:
	if i <= b:
		z += i
	if z > d:
		c += 1
		z = 0
print(c)


(n, b, d) = map(int, input().split())
a = [int(x) for x in input().split()]
j = 0
z = 0
t = 0
for i in a:
	if i <= b:
		j = j + i
		if j > d:
			j = 0
			z += 1
	elif i > b:
		z += 0
print(z)


def solve(oranges, b, d):
	total = 0
	count = 0
	for size in oranges:
		if size <= b:
			total += size
		if total > d:
			total = 0
			count += 1
	return count
n = list(map(str, input().split()))
array = list(map(str, input().split()))
n = list(map(int, n))
array = list(map(int, array))
b = n[1]
d = n[2]
print(solve(array, b, d))


(n, b, d) = input().split()
n = int(n)
b = int(b)
d = int(d)
A = list(map(int, input().split()))
totalsize = 0
waste = 0
for i in range(n):
	if A[i] > b:
		continue
	else:
		totalsize = totalsize + A[i]
		if totalsize > d:
			totalsize = 0
			waste = waste + 1
print(waste)


(n, b, d) = map(int, input().split())
(c, v) = (0, 0)
for x in map(int, input().split()):
	if x > b:
		continue
	c += x
	if c > d:
		c = 0
		v += 1
print(v)


(n, b, d) = input().split()
(n, b, d) = (int(n), int(b), int(d))
oranges = list(map(int, input().strip().split()))[:n]
total = 0
waste = 0
for i in oranges:
	if i <= b:
		total += i
		if total > d:
			waste += 1
			total = 0
print(waste)


(n, b, d) = map(int, input().split())
l = 0
s = [int(k) for k in input().split()]
m = 0
for n in range(len(s)):
	if s[n] <= b:
		m += s[n]
	if m > d:
		m = 0
		l += 1
print(l)


from sys import stdin
import collections

def f(b, d, s):
	c = ans = 0
	for ss in s.split(' '):
		if int(ss) > int(b):
			continue
		c += int(ss)
		if c > int(d):
			ans += 1
			c = 0
	return ans
m = stdin.readline()
(n, b, d) = m.split(' ')
s = stdin.readline()
print(f(b, d, s))


(nOranges, maxSize, totalJused) = map(int, input().split(' '))
oranges = list(map(int, input().split(' ')))
wisted = 0
shift = 0
for i in oranges:
	if i > maxSize:
		continue
	else:
		shift += i
		if shift > totalJused:
			wisted += 1
			shift = 0
print(wisted)


(n, b, d) = map(int, input().split())
l = list(map(int, input().split()))
Clean = 0
Total = 0
for x in l:
	if x < b + 1:
		Total += x
		if Total > d:
			Total = 0
			Clean += 1
print(Clean)


(n, b, d) = map(int, input().split())
orange = 0
change = 0
waste = 0
for i in input().split():
	i = int(i)
	if i <= b:
		waste += i
	if waste > d:
		change += 1
		waste = 0
print(change)


(n, b, d) = map(int, input().split())
arr = list(map(int, input().split()))
tracker = 0
count = 0
for i in range(len(arr)):
	if arr[i] <= b:
		tracker += arr[i]
	if tracker > d:
		tracker = 0
		count += 1
print(count)


def main():
	juice = list(map(int, input().split(' ')))
	liters = list(map(int, input().split(' ')))
	cup = 0
	count = 0
	for i in range(len(liters)):
		if liters[i] <= juice[1]:
			cup += liters[i]
		if cup > juice[2]:
			count += 1
			cup = 0
	print(count)
main()


R = lambda : list(map(int, input().split()))
(n, b, d) = R()
k = list(filter(lambda x: x <= b, R()))
(c, h) = (0, 0)
for i in k:
	c += i
	if c > d:
		h += 1
		c = 0
print(h)


[n, b, d] = [int(x) for x in input().split()]
oranges = [int(x) for x in input().split() if int(x) <= b]
buff = 0
ans = 0
for orange in oranges:
	buff += orange
	if buff > d:
		buff = 0
		ans += 1
print(ans)


(n, b, k) = map(int, input().split())
array = list(map(int, input().split()))
now = 0
count = 0
for num in array:
	if num <= b:
		now += num
		if now > k:
			now = 0
			count += 1
print(count)


instractions = list(map(int, input().split()))
oranges = list(map(int, input().split()))
times = 0
sizes = 0
for orange in oranges:
	if orange > instractions[1]:
		continue
	sizes += orange
	if sizes > instractions[2]:
		sizes = 0
		times += 1
print(times)


(a, b, c) = list(map(int, input().split()))
d = list(map(int, input().split()))
count = 0
bleh = 0
for g in d:
	if g <= b:
		count += g
		if count > c:
			bleh += 1
			count = 0
print(bleh)


trash = 0
x = 0
(n, b, d) = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]
for i in a:
	if i <= b:
		trash += i
		if trash > d:
			trash = 0
			x += 1
print(x)


(n, b, d) = list(map(int, input().split()))
res = 0
total = 0
lst = list(map(int, input().split()))
for i in lst:
	if i <= b:
		total += i
	if total > d:
		res += 1
		total = 0
print(res)


data = [int(x) for x in input().split()]
orange_size = [int(i) for i in input().split()]
waste = 0
count = 0
for i in range(0, len(orange_size)):
	if orange_size[i] <= data[1]:
		waste = waste + orange_size[i]
		if waste > data[2]:
			count = count + 1
			waste = 0
print(count)


(n, b, d) = map(int, input().split())
size = list((int(i) for i in input().split() if int(i) <= b))
(cnt, s) = (0, 0)
for i in size:
	s += i
	if s > d:
		cnt += 1
		s = 0
print(cnt)


a = list(map(int, input().split()))
t = list(map(int, input().split()))
kas = 0
n = 0
for e in t:
	if e > a[1]:
		continue
	else:
		kas += e
		if kas > a[2]:
			kas = 0
			n += 1
print(n)


def emptyJuicer(oranges, size, empty):
	sizeCount = 0
	emptyCount = 0
	for orange in oranges:
		if int(size) < int(orange):
			continue
		sizeCount += int(orange)
		if sizeCount > int(empty):
			emptyCount += 1
			sizeCount = 0
	return emptyCount
listOfInputs = input().split()
oranges = input().split()
print(emptyJuicer(oranges, listOfInputs[1], listOfInputs[2]))


(n, b, d) = map(int, input().split())
A = list(map(int, input().split()))
L = []
cnt = 0
s = 0
for i in range(len(A)):
	if A[i] <= b:
		L.append(A[i])
for i in range(len(L)):
	s += int(L[i])
	if s > d:
		s = 0
		cnt += 1
print(cnt)


def nuskaityt():
	(n, b, d) = input().split()
	apel = input().split()
	li = []
	for i in apel:
		if int(i) < int(b) or int(i) == int(b):
			li.append(i)
	return (d, li)

def spausti(duomenys):
	suma = 0
	k = 0
	for i in duomenys[1]:
		suma += int(i)
		if suma > int(duomenys[0]):
			k += 1
			suma = 0
	return k
a = nuskaityt()
operacija = spausti(a)
print(operacija)


(n, b, d) = input().split()
n = int(n)
b = int(b)
d = int(d)
a = input().split()
for i in range(0, n):
	a[i] = int(a[i])
total_size = 0
num_of_times = 0
for i in range(0, n):
	if a[i] <= b:
		total_size += a[i]
	if total_size > d:
		num_of_times += 1
		total_size = 0
print(num_of_times)


(n, b, d) = map(int, input().split())
a = list(map(int, input().split()))
total = 0
empty = 0
for i in a:
	if i <= b:
		total += i
	if total > d:
		empty += 1
		total = 0
print(empty)


nums = list(map(int, input().split()))
oranges = list(map(int, input().split()))
(total, empties) = (0, 0)
for i in range(nums[0]):
	if oranges[i] <= nums[1]:
		total += oranges[i]
	if total > nums[2]:
		empties += 1
		total = 0
print(empties)


n = [int(i) for i in input().split()]
a = [int(r) for r in input().split()]
b = d = 0
for num in a:
	if num <= n[1]:
		b += num
		if b > n[2]:
			d += 1
			b = 0
print(d)


from sys import stdin

def main():
	(n, b, d) = stdin_get_ints_from_line()
	a = stdin_get_ints_list_from_line()
	result = 0
	r = 0
	for elem in a:
		if elem <= b:
			result += elem
		if result > d:
			r += 1
			result = 0
	print(r)
	return

def stdin_get_ints_from_line():
	return (int(x) for x in stdin.readline().strip().split(' '))

def stdin_get_ints_list_from_line():
	return list((int(x) for x in stdin.readline().strip().split(' ')))

def stdin_get_string_from_line():
	return stdin.readline().strip()
main()


(n, b, d) = map(int, input().split())
oranges = list(map(int, input().split()))
vol = 0
cl = 0
for orange in oranges:
	if orange > b:
		continue
	else:
		vol += orange
		if vol > d:
			cl += 1
			vol = 0
print(cl)


def juicy(n, b, d, lst):
	(s, r) = (0, 0)
	for i in range(n):
		if lst[i] > b:
			continue
		s += lst[i]
		if s > d:
			r += 1
			s = 0
	return r
(N, B, D) = [int(j) for j in input().split()]
a = [int(x) for x in input().split()]
print(juicy(N, B, D, a))


(n, b, d) = map(int, input().split())
p = 0
q = 0
for i in map(int, input().split()):
	if i <= b:
		q = q + i
	if q > d:
		p += 1
		q = 0
print(p)


def solution(a, n, b, d):
	cumsum = 0
	count = 0
	for x in a:
		if x > b:
			continue
		cumsum += x
		if cumsum > d:
			count += 1
			cumsum = 0
	return count
(n, b, d) = map(int, input().split())
a = list(map(int, input().split()))
print(solution(a, n, b, d))


def main():
	(noranges, max_size_fits, size_of_waste_section) = map(int, input().split())
	oranges = map(int, input().split())

	def how_many_waste_section_will_emptied(max_size_fits, size_of_waste_section, oranges):
		counter = 0
		current_size = 0
		for orange in oranges:
			if orange <= max_size_fits:
				if orange + current_size <= size_of_waste_section:
					current_size += orange
				else:
					current_size = 0
					counter += 1
		return counter
	print(how_many_waste_section_will_emptied(max_size_fits, size_of_waste_section, oranges))
main()


nums = input().split()
lst = input().split()
box = 0
times = 0
size = int(nums[1])
maxm = int(nums[2])
for i in lst:
	if int(i) <= size:
		box += int(i)
	if box > maxm:
		box = 0
		times += 1
print(times)


def juiser():
	(a, b, c) = map(int, input().split())
	x = list(map(int, input().split()))
	waste = 0
	count = 0
	for i in range(len(x)):
		if x[i] <= b:
			waste += x[i]
		else:
			continue
		if waste > c:
			count += 1
			waste = 0
	print(count)
juiser()


read = lambda : map(int, input().split())
(n, b, d) = read()
s = 0
ans = 0
for a in list(read()):
	if a <= b:
		s += a
		if s > d:
			s = 0
			ans += 1
print(ans)


lis = list((int(num) for num in input().strip().split()))[:3]
n = lis[0]
b = lis[1]
d = lis[2]
numList = list((int(num) for num in input().strip().split()))[:n]
j = 0
nempty = 0
for num in numList:
	if num <= b:
		j += num
	if j > d:
		nempty += 1
		j = 0
print(nempty)


info = input('').split(' ')
n = int(info[0])
b = int(info[1])
d = int(info[2])
sizes = [int(x) for x in input('').split(' ') if int(x) <= b]
times = 0
waste = 0
for o in sizes:
	waste += o
	if waste > d:
		times += 1
		waste = 0
print(times)


(_, b, d) = map(int, input().split())
(r, c) = (0, d)
for x in map(int, input().split()):
	if x > b:
		continue
	c -= x
	if c < 0:
		r += 1
		c = d
print(r)


(n, b, d) = map(int, input().split())
a = list(map(int, input().split()))
jarc = 0
wast = 0
ans = 0
for i in a:
	if i <= b:
		jarc += i
	if jarc > d:
		ans += 1
		jarc = 0
print(ans)


import operator as op
import re
import sys
from bisect import bisect, bisect_left, insort, insort_left
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from functools import reduce
from itertools import accumulate, combinations, combinations_with_replacement, groupby, permutations, product
from math import acos, asin, atan, ceil, cos, degrees, factorial, gcd, hypot, log2, pi, radians, sin, sqrt, tan
from operator import itemgetter, mul
from string import ascii_lowercase, ascii_uppercase, digits

def inp():
	return int(input())

def inlist():
	return list(map(int, input().split()))

def instr():
	s = input()
	return list(s[:len(s)])

def invr():
	return map(int, input().split())

def def_value():
	return 0
(n, b, d) = invr()
a = inlist()
sq = 0
res = 0
for i in a:
	if i > b:
		continue
	sq += i
	if sq > d:
		sq = 0
		res += 1
print(res)


(n, m, l) = map(int, input().split())
a = list(map(int, input().split()))
c = 0
sum = 0
for i in a:
	if i <= m:
		sum = sum + i
	if sum > l:
		sum = 0
		c = c + 1
print(c)


(n, b, d) = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]
sum = 0
counter = 0
for elem in a:
	if elem > b:
		continue
	elif elem <= b:
		sum += elem
		if sum > d:
			counter += 1
			sum = 0
print(counter)


(n, b, d) = map(int, input().split())
oranges = [int(i) for i in input().split()]
waste_total = 0
empty_times = 0
for orange in oranges:
	if orange <= b:
		waste_total += orange
		if waste_total > d:
			empty_times += 1
			waste_total = 0
print(empty_times)


(n, b, d) = map(int, input().split())
oran = list(map(int, input().split()))
wsec = out = 0
for i in oran:
	if i <= b:
		wsec += i
		if wsec > d:
			out += 1
			wsec = 0
print(out)


L = list(map(int, input().split()))
n = L[0]
b = L[1]
d = L[2]
S = list(map(int, input().split()))
total = 0
count = 0
for i in S:
	if i <= b:
		total += i
	if total > d:
		count += 1
		total = 0
print(count)


(n, b, d) = (int(z) for z in input().split())
r = [int(z) for z in input().split()]
i = 0
ans = 0
cur = 0
for i in range(n):
	if r[i] <= b:
		cur += r[i]
		if cur > d:
			cur = 0
			ans += 1
print(ans)


ipt = input().split(' ')
(waste, output) = (0, 0)
a = input().split(' ')
for x in range(int(ipt[0])):
	a[x] = int(a[x])
	if a[x] <= int(ipt[1]):
		waste += a[x]
		if waste > int(ipt[2]):
			waste = 0
			output += 1
print(output)


def main():
	(n, b, d) = map(int, input().split())
	a = list(map(int, input().split()))
	add = 0
	cnt = 0
	for i in range(len(a)):
		if a[i] <= b:
			add += a[i]
		if add > d:
			add = 0
			cnt += 1
	print(cnt)
main()


nbd = input().strip().split(' ')
n = int(nbd[0])
b = int(nbd[1])
d = int(nbd[2])
tot = 0
e = 0
orgs = input().strip().split(' ')
for i in range(n):
	a = int(orgs[i])
	if a > b:
		pass
	else:
		tot += a
	if tot > d:
		e += 1
		tot = 0
print(e)


(n, b, d) = map(int, input().split())
seq = list(map(int, input().split()))
waste = 0
total = 0
for i in range(n):
	if seq[i] <= b:
		waste += seq[i]
	if waste > d:
		total += 1
		waste = 0
print(int(total))


from sys import stdin
import math
from fractions import Fraction
x = [int(z) for z in stdin.readline().strip().split()]
o = [int(o) for o in stdin.readline().strip().split()]

def solution2(b, d, o):
	s = 0
	c = 0
	for x in o:
		if x <= b:
			s += x
			if s > d:
				c += 1
				s = 0
	return c
print(solution2(x[1], x[2], o))


ip = input().split(' ')
ip = list(map(int, ip))
ip2 = input().split(' ')
ip2 = list(map(int, ip2))
count = 0
ssq = 0
for x in ip2:
	if x <= ip[1]:
		ssq = ssq + x
	if ssq > ip[2]:
		count = count + 1
		ssq = 0
print(count)


(n, b, d) = (int(x) for x in input().split())
a = [int(x) for x in input().split()]
a_ = []
t = 0
for size in a:
	if size <= b:
		a_.append(size)
	if sum(a_) > d:
		t += 1
		a_ = []
print(t)


(a, b, c) = [int(x) for x in input().split()]
x = [int(x) for x in input().split()]
sum = 0
t = 0
for i in range(a):
	if x[i] > b:
		continue
	sum += x[i]
	if sum > c:
		t += 1
		sum = 0
print(t)


(n, b, d) = map(int, input().strip().split())
l1 = list(map(int, input().strip().split()))
res = 0
r = 0
for i in l1:
	if i <= b:
		res += i
		if res > d:
			r += 1
			res = 0
print(r)


def solve():
	(n, b, d) = map(int, input().split())
	a = list(map(int, input().split()))
	c = 0
	ans = 0
	for i in range(n):
		if a[i] > b:
			continue
		c += a[i]
		if c > d:
			ans += 1
			c = 0
	print(ans)

def main():
	solve()
main()


n = input().split()
b = int(n[1])
d = int(n[2])
n = int(n[0])
l = input().split()
l = [int(i) for i in l]
sum = 0
count = 0
for items in l:
	if items <= b:
		sum += items
		if sum > d:
			count += 1
			sum = 0
print(count)


(n, b, d) = [int(n) for n in input().split()]
a = [int(a) for a in input().split()]
c = s = 0
for j in a:
	if j > b:
		continue
	s = s + j
	if s > d:
		s = 0
		c += 1
print(c)


(n, b, d) = map(int, input().split())
arr = list(map(int, input().split()))
container = 0
fruits = 0
ans = 0
for elem in arr:
	if elem > b:
		continue
	fruits += elem
	container += elem
	if container > d:
		container = 0
		ans += 1
print(ans)


(n, b, d) = map(int, input().split())
lst = list(map(int, input().split()))
(ans, i) = (0, 0)
k = 0
while i < n:
	if lst[i] <= b:
		k += lst[i]
	if k > d:
		k = 0
		ans += 1
	i += 1
print(ans)


(n, b, d) = map(int, input().split())
n = s = 0
for a in map(int, input().split()):
	if b >= a:
		s += a
		if d < s:
			n += 1
			s = 0
print(n)


FirstLine = input('')
SecondLine = input('')
FL = FirstLine.split()
SL = SecondLine.split()
FLN = [int(num) for num in FL]
SLN = [int(num) for num in SL]
n = FLN[0]
max_size = FLN[1]
d = FLN[2]
etime = 0
waste = 0
for orange in SLN:
	if orange > max_size:
		continue
	else:
		waste = waste + orange
		if waste > d:
			waste = 0
			etime = etime + 1
print(etime)


(n, b, d) = input().split(' ')
(n, b, d) = (int(n), int(b), int(d))
orangesSize = [int(s) for s in input().split(' ')]
collection = 0
count = 0
for i in orangesSize:
	if i <= b:
		collection += i
	if collection > d:
		count += 1
		collection = 0
print(count)


def get_num(n, b, d, oranges):
	size_sum = 0
	emptyings = 0
	for orange in oranges:
		if orange > b:
			continue
		else:
			size_sum += orange
			if size_sum > d:
				size_sum = 0
				emptyings += 1
	return emptyings
(n, b, d) = map(int, input().split())
oranges = list(map(int, input().split()))
print(get_num(n, b, d, oranges))


(N, B, D) = [int(x) for x in input().split()]
Oranges = [int(x) for x in input().split()]
WasteCounter = 0
TimesEmptied = 0
for i in Oranges:
	if i > B:
		continue
	else:
		WasteCounter += i
		if WasteCounter > D:
			WasteCounter = 0
			TimesEmptied += 1
print(TimesEmptied)


import sys
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
(n, b, d) = invr()
oranges = inlt()
oranges = [o for o in oranges if o <= b]
count = 0
dumps = 0
for o in oranges:
	count += o
	if count > d:
		dumps += 1
		count = 0
print(dumps)


(n, b, d) = input().split()
(n, b, d) = (int(n), int(b), int(d))
l = input().split()
p = 0
s = 0
for i in range(n):
	l[i] = int(l[i])
	if l[i] <= b:
		s += l[i]
		if s > d:
			p += 1
			s = 0
print(p)


def main():
	(n, b, d) = map(int, input().split())
	arr = list(map(int, input().split()))
	num = 0
	taken = 0
	for i in arr:
		if i > b:
			continue
		taken += i
		if taken > d:
			taken = 0
			num += 1
	print(num)
main()


(a, b, d) = map(int, input().split())
res = 0
cnt = 0
l = list(map(int, input().split()))
for i in l:
	if i <= b:
		res += i
	if res > d:
		cnt += 1
		res = 0
print(cnt)


(n, b, d) = map(int, input().split())
a = map(int, input().split())
s = 0
r = 0
for x in a:
	if x > b:
		continue
	s += x
	if s > d:
		r += 1
		s = 0
print(r)


(n, z, j) = map(int, input().split())
l = list(map(int, input().split()))
cup = 0
res = 0
for i in l:
	if i <= z:
		cup += i
	if cup > j:
		res += 1
		cup = 0
print(res)


(z, t) = (0, 0)
(n, b, d) = (int(i) for i in input().split())
O = input().split()
for x in O:
	x = int(x)
	if x <= b:
		t = t + x
	if t > d:
		z = z + 1
		t = -0
print(z)


string = input()
numbers = string.split()
a = int(numbers[0])
b = int(numbers[1])
c = int(numbers[2])
string = input()
numbers = [int(x) for x in string.split()]
n = 0
e = 0
for x in numbers:
	if x <= b:
		n += x
		if n > c:
			n = 0
			e += 1
print(e)


(n, m, d) = [int(x) for x in input().split()]
l = [int(x) for x in input().split() if int(x) <= m]
c = 0
s = 0
for i in l:
	s += i
	if s > d:
		c += 1
		s = 0
print(c)


import math
arr = list(map(int, input().split()))
n = arr[0]
b = arr[1]
d = arr[2]
s = 0
count = 0
arr = list(map(int, input().split()))
for i in arr:
	if i > b:
		continue
	else:
		s += i
		if s > d:
			count += 1
			s = 0
print(count)


(n, b, d) = map(int, input().split())
l = list(map(int, input().split()))
l = list(filter(lambda x: x <= b, l))
s = 0
c = 0
for i in range(0, len(l)):
	s = s + l[i]
	if s > d:
		s = 0
		c = c + 1
print(c)


(n, b, d) = input('').split(' ')
oranges_size = input('').split(' ')
oranges_size = [int(i) for i in oranges_size]
trash = 0
counter = 0
for i in range(int(n)):
	oranges_size[i]
	if oranges_size[i] <= int(b):
		trash += oranges_size[i]
		if trash > int(d):
			counter += 1
			trash = 0
print(counter)


(n, b, d) = [int(ele) for ele in input().split()]
l = [int(el) for el in input().split()]
(count, sum) = (0, 0)
for e in l:
	if e > b:
		continue
	sum += e
	if sum > d:
		sum = 0
		count += 1
print(count)


(n, b, d) = list(map(int, input().split(' ')))
nums = list(map(int, input().split(' ')))
times = 0
total = 0
for num in nums:
	if num > b:
		pass
	else:
		total += num
		if total > d:
			total = 0
			times += 1
print(times)


(n, b, d) = map(int, input().split())
sm = 0
counter = 0
li = list(map(int, input().split()))
for i in li:
	if i <= b:
		sm += i
		if sm > d:
			counter += 1
			sm = 0
print(counter)


import sys
import math
import bisect
import itertools
import random
import re

def main():
	(n, b, d) = map(int, input().split())
	A = list(map(int, input().split()))
	ans = 0
	r = 0
	for a in A:
		if a <= b:
			r += a
			if r > d:
				r = 0
				ans += 1
	print(ans)
main()


string = str(input())
arr = string.split()
for i in range(len(arr)):
	arr[i] = int(arr[i])
string2 = str(input())
arr2 = string2.split()
for i in range(len(arr2)):
	arr2[i] = int(arr2[i])
sum = 0
d = 0
arr3 = []
for i in range(len(arr2)):
	if arr2[i] <= arr[1]:
		sum += arr2[i]
	if sum > arr[2]:
		d += 1
		sum = 0
print(d)


(n, orange_size, waste_size) = map(int, input().split())
l1 = [int(x) for x in input().split()]
count = 0
sum1 = 0
for oranges in l1:
	if oranges <= orange_size:
		if sum1 > waste_size:
			sum1 = 0
			count += 1
		sum1 += oranges
if sum1 > waste_size:
	count = count + 1
print(count)


(n, b, d) = map(int, input().split())
a = list(map(int, input().split()))
c = 0
cont = 0
for x in a:
	if x <= b:
		cont += x
		if cont > d:
			c += 1
			cont = 0
print(c)


(n, b, d) = map(int, input().split())
arr = [int(x) for x in input().split()]
total = 0
count = 0
for i in range(len(arr)):
	if arr[i] <= b:
		total += arr[i]
		if total > d:
			count += 1
			total = 0
print(count)


(n, b, d) = [int(i) for i in input().split()]
s = [int(i) for i in input().split()]
k = 0
ans = 0
for i in s:
	if i <= b:
		k += i
		if k > d:
			ans += 1
			k = 0
print(ans)


(x, y, z) = map(int, input().split())
o = list(map(int, input().split()))
(juicer, e_counter) = (0, 0)
for i in range(x):
	if o[i] <= y:
		juicer += o[i]
		if juicer > z:
			juicer = 0
			e_counter += 1
print(e_counter)


from sys import stdin
(_, b, d) = map(int, stdin.readline().split())
l = map(int, stdin.readline().split())
(w, c) = (0, 0)
for i in l:
	if i <= b:
		w += i
		if w > d:
			w = 0
			c += 1
print(c)


(n, b, d) = tuple(map(int, input().split()))
n_ums = list(map(int, input().split()))
amount = 0
count = 0
for i in n_ums:
	if i <= b:
		amount += i
	if amount > d:
		count += 1
		amount = 0
print(count)


def main():
	(n, b, d) = map(int, input().split())
	arr = list(map(int, input().split()))
	ctr = 0
	waste = 0
	for i in arr:
		if i <= b:
			waste += i
			if waste > d:
				waste = 0
				ctr += 1
	print(ctr)
main()


(n, b, d) = map(int, input().split())
o = list(map(int, input().split()))
c = 0
w = 0
for x in o:
	if x > b:
		continue
	c += x
	if c > d:
		w += 1
		c = 0
print(w)


def juice(arr, b, d):
	k = 0
	ans = 0
	for (i, n) in enumerate(arr):
		if n > b:
			continue
		k += n
		if k > d:
			ans += 1
			k = 0
	return ans
(n, b, d) = list(map(int, input().rstrip().split()))
arr = list(map(int, input().rstrip().split()))
print(juice(arr, b, d))


ip = list(map(int, input().split()))
(n, b, d) = (ip[0], ip[1], ip[2])
oranges = list(map(int, input().split()))
total_size = 0
waste = 0
for orange in oranges:
	if orange <= b:
		total_size += orange
		if total_size > d:
			total_size = 0
			waste += 1
print(waste)


x = [int(i) for i in input().split()]
n = x[0]
b = x[1]
d = x[2]
x = [int(i) for i in input().split()]
s = 0
t = 0
for o in x:
	if o <= b:
		s += o
		if s > d:
			s = 0
			t += 1
print(t)


import math as m
sum = 0
w = 0
(n, b, d) = map(int, input().split())
a = list(map(int, input().split()))
for i in range(n):
	if a[i] <= b:
		sum = sum + a[i]
	if sum > d:
		w = w + 1
		sum = 0
print(w)


(a, b, d) = map(int, input().split()[:3])
l = list(map(int, input().split()[:a]))
ans = 0
sol = 0
for i in range(a):
	k = l[i]
	if k > b:
		continue
	else:
		sol += k
		if sol > d:
			ans += 1
			sol = 0
print(ans)


import bisect
(n, b, d) = map(int, input().split())
listt = list(map(int, input().split()))
total = 0
count = 0
for i in listt:
	if i <= b:
		if total <= d:
			total += i
			if total > d:
				total = 0
				count += 1
print(count)


(n, b, d) = map(int, input().split())
sizes = [size for size in map(int, input().split()) if size <= b]
sizes_sum = 0
result = 0
for size in sizes:
	sizes_sum += size
	if sizes_sum > d:
		result += 1
		sizes_sum = 0
print(result)


def empty(n, b, d, a):
	sum = 0
	num = 0
	for orange in a:
		if orange <= b:
			sum += orange
			if sum > d:
				num += 1
				sum = 0
	return num
(n, b, d) = map(int, input().split())
a = list(map(int, input().split()))
num = empty(n, b, d, a)
print(num)


(n, b, d) = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]
w_sum = 0
t = 0
for i in range(n):
	if a[i] <= b:
		w_sum += a[i]
	if w_sum > d:
		t += 1
		w_sum = 0
print(t)


(n, b, d) = tuple(map(int, input().split()))
oranges = list(map(int, input().split()))
empties = total_waste = 0
for orange in oranges:
	if orange <= b:
		total_waste += orange
	if total_waste > d:
		empties += 1
		total_waste = 0
print(empties)


import sys
lines = []
for line in sys.stdin:
	lines.append(line.strip())
(n, b, d) = [int(s) for s in lines[0].split(' ')]
all_oranges = [int(s) for s in lines[1].split(' ')]
oranges = [int(s) for s in lines[1].split(' ') if int(s) <= b]
assert len(all_oranges) == n
w = 0
s = 0
for o in oranges:
	s += o
	if s > d:
		s = 0
		w += 1
print(w)


(n, b, d) = [int(x) for x in input().split()]
tot = 0
ans = 0
for x in map(int, input().split()):
	if x > b:
		continue
	else:
		tot += x
		if tot > d:
			ans += 1
			tot = 0
print(ans)


import sys
import math
get_string = lambda : sys.stdin.readline().strip()
get_int_list = lambda : list(map(int, sys.stdin.readline().strip().split()))
get_int = lambda : int(sys.stdin.readline())
(n, b, d) = get_int_list()
lst = get_int_list()
count = 0
s = 0
for i in range(n):
	if lst[i] <= b:
		s += lst[i]
	if s > d:
		count += 1
		s = 0
print(count)


(n, b, d) = [int(x) for x in input().split()]
A = [int(x) for x in input().split()]
reminder = 0
counter = 0
for a in A:
	if a > b:
		continue
	reminder += a
	if reminder > d:
		counter += 1
		reminder = 0
print(counter)


(n, b, d) = map(int, input().split())
su = 0
c = 0
v = [int(x) for x in input().split()]
for i in range(n):
	x = v[i]
	if not x > b:
		su += x
		if su > d:
			c += 1
			su = 0
print(c)


(n, b, d) = map(int, input().split())
a = [int(x) for x in input().split()]
waste = 0
count = 0
for x in a:
	if x <= b:
		waste += x
	if waste > d:
		count += 1
		waste = 0
print(count)


(N, B, D) = [int(x) for x in input().split()]
sizes = [int(x) for x in input().split()]
Waste = 0
TimesWasted = 0
for i in sizes:
	if i > B:
		continue
	else:
		Waste += i
		if Waste > D:
			Waste = 0
			TimesWasted += 1
print(TimesWasted)


(n, m, d) = map(int, input().split())
list_ = list(map(int, input().split()))
min_ = min(list_)
if min_ > m:
	print('0')
else:
	list2 = []
	count = 0
	for item in list_:
		if item > m:
			continue
		else:
			list2.append(item)
	d2 = d
	for item2 in list2:
		d2 = d2 - item2
		if d2 < 0:
			count = count + 1
			d2 = d
		else:
			continue
	print(count)


(n, b, d) = [int(i) for i in input().split()]
w = 0
count = 0
a = [int(i) for i in input().split()]
for i in range(0, len(a)):
	if a[i] > b:
		continue
	else:
		w = w + a[i]
		if w > d:
			count = count + 1
			w = 0
print(count)


(n, lim, d) = map(int, input().split())
q = list(map(int, input().split()))
cur = 0
counter = 0
for elem in q:
	if elem > lim:
		continue
	cur += elem
	if cur > d:
		counter += 1
		cur = 0
print(counter)


nbd = list(map(int, input().split()))
a = list(map(int, input().split()))
temp = 0
count = 0
for i in range(nbd[0]):
	if a[i] <= nbd[1]:
		temp += a[i]
	if temp > nbd[2]:
		count += 1
		temp = 0
print(count)


import re

def juicer(oranges, b, d):
	load = 0
	count = 0
	for i in range(len(oranges)):
		if int(oranges[i]) > int(b):
			continue
		else:
			load += int(oranges[i])
			if load > int(d):
				count += 1
				load = 0
	return count
regex = re.compile('\\d+')
l = input()
s = regex.findall(l.replace(' ', '_'))
b = s[1]
d = s[2]
oranges = input()
k = regex.findall(oranges.replace(' ', '_'))
print(juicer(k, b, d))


count = 0
(n, b, d) = map(int, input().split())
i = d
l = list(map(int, input().split()))
for item in l:
	if item <= b:
		i -= item
		if i < 0:
			count += 1
			i = d
print(count)


[orange_cnt, max_size, waste_size] = [int(i) for i in input().split()]
orange_sizes = [int(i) for i in input().split()]
current_waste = 0
waste_basket_clean = 0
for i in orange_sizes:
	if i <= max_size:
		current_waste += i
		if current_waste > waste_size:
			waste_basket_clean += 1
			current_waste = 0
print(waste_basket_clean)


from itertools import filterfalse
(n, a, b) = map(int, input().split())
l = list(map(int, input().split()))
l = list(filterfalse(lambda x: x > a, l))
ctr = temp = 0
for i in l:
	temp += i
	if temp > b:
		temp = 0
		ctr += 1
print(ctr)


(n, b, d) = map(int, input().split())
o = list(map(int, input().split()))
c = 0
f = 0
for i in range(len(o)):
	if o[i] <= b:
		c += o[i]
	if c > d:
		f += 1
		c = 0
print(f)


(n, b, d) = map(int, input().split())
l = list(map(int, input().split()))
a = []
c = 0
for i in l:
	if i > b:
		continue
	else:
		a.append(i)
	if sum(a) > d:
		c += 1
		a.clear()
print(c)


(a, b, d) = map(int, input().split())
arr = list(map(int, input().split()))
ans = 0
bin = 0
for n in arr:
	if n <= b:
		bin += n
		if bin > d:
			ans += 1
			bin = 0
print(ans)


import math
m = 1000000007

def fact(n):
	ans = 1
	for i in range(1, n + 1):
		ans = ans % m * (i % m) % m
	return ans

def power_2(n):
	ans = 1
	for i in range(n):
		ans = ans % m * 2 % m
	return ans
(n, b, d) = map(int, input().split())
a = [int(i) for i in input().split()]
(ts, emt) = (0, 0)
for i in range(n):
	if a[i] <= b:
		ts += a[i]
	if ts > d:
		emt += 1
		ts = 0
print(emt)


(n, b, d) = list(map(int, input().split()))
l = list(map(int, input().split()))
(res, temp) = (0, 0)
for i in l:
	if i <= b:
		temp += i
		if temp > d:
			res += 1
			temp = 0
print(res)


(n, b, d) = map(int, input().split())
a = list(map(int, input().strip().split()))
w = 0
sum = 0
for i in range(0, n):
	if a[i] > b:
		continue
	else:
		sum += a[i]
		if sum > d:
			w += 1
			sum = 0
print(w)


import sys

def main():
	(n, b, d) = map(int, sys.stdin.readline().split())
	x = list(map(int, sys.stdin.readline().split()))
	s = 0
	ans = 0
	for i in range(n):
		if x[i] <= b:
			s += x[i]
			if s > d:
				s = 0
				ans += 1
	print(ans)
main()


(a, b, c) = map(int, input().split())
l = list(map(int, input().split()))
(z, x) = (0, 0)
for i in l:
	if i <= b:
		z += i
		if z > c:
			x += 1
			z = 0
print(x)


(n, b, d) = input().split()
n = int(n)
b = int(b)
d = int(d)
l = list(map(int, input().split()))
sum = 0
cnt = 0
for i in range(n):
	if l[i] > b:
		continue
	elif sum + l[i] > d:
		sum = 0
		cnt += 1
	else:
		sum += l[i]
print(cnt)


(n, b, d) = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]
S = 0
rez = 0
for i in range(n):
	if a[i] > b:
		continue
	else:
		S += a[i]
		if S > d:
			rez += 1
			S = 0
print(rez)


(n, a, b) = map(int, input().split())
l = list(map(int, input().split()))
m = []
c = 0
s = 0
for i in l:
	if i <= a:
		m.append(i)
for i in m:
	s = s + i
	if s > b:
		c += 1
		s = 0
print(c)


(_, b, d) = map(int, input().split())
data = filter(lambda v: v <= b, map(int, input().split()))
acc = 0
result = 0
for v in data:
	acc += v
	if acc > d:
		result += 1
		acc = 0
print(result)


(n, b, d) = input().split()
(waste, count) = (0, 0)
all = [int(o) for o in input().split()]
for o in all:
	if o <= int(b):
		waste += o
	if waste > int(d):
		waste = 0
		count += 1
print(count)


Input = lambda : map(int, input().split())
List = list(Input())
a = list(Input())
over = ans = 0
for i in range(List[0]):
	if a[i] > List[1]:
		pass
	else:
		over += a[i]
		if over > List[2]:
			ans += 1
			over = 0
		else:
			pass
print(ans)


from fractions import Fraction
import sys

def i():
	return input()

def ii():
	return int(input())

def li():
	return input().split()

def mi():
	return list(map(int, input().split()))
(n, b, d) = mi()
a = mi()
w = 0
ans = 0
for i in a:
	if i > b:
		continue
	else:
		w += i
	if w > d:
		ans += 1
		w = 0
print(ans)


(n, b, d) = map(int, input().split())
a = list(map(int, input().split()))
(s, t) = (0, 0)
for x in a:
	if x <= b:
		s += x
	if s > d:
		s = 0
		t += 1
print(t)


[n, b, d] = list(map(int, input().split(' ')))
a = list(map(int, input().split(' ')))
r = 0
g = 0
for i in a:
	if i <= b:
		g += i
		r += 1 if g > d else 0
		g = 0 if g > d else g
print(r)


s = input()
s1 = s.split()
n = int(s1[0])
b = int(s1[1])
d = int(s1[2])
s = input()
s1 = s.split()
sum = 0
ans = 0
for i in s1:
	if sum > d:
		ans += 1
		sum = 0
	if int(i) <= b:
		sum += int(i)
if sum > d:
	ans += 1
print(ans)


(n, b, f) = map(int, input().split())
z = 0
cc = 0
for i in [*map(int, input().split())]:
	if i <= b:
		z = z + i
	if z > f:
		cc += 1
		z = 0
print(cc)


(n, b, d) = [int(i) for i in input().split()]
orange = [int(i) for i in input().split()]
size = 0
empty = 0
for i in range(n):
	if orange[i] <= b:
		size = size + orange[i]
	if size > d:
		size = 0
		empty += 1
print(empty)


inp = str(input()).split(' ')
inp2 = str(input()).split(' ')
n = int(inp[0])
b = int(inp[1])
d = int(inp[2])
waste = 0
counter = 0
for i in range(n):
	if b >= int(inp2[i]):
		waste += int(inp2[i])
		if waste > d:
			waste = 0
			counter += 1
print(counter)


(n, b, d) = [int(x) for x in input().split()]
a = [int(x) for x in input().split()]
total = 0
count = 0
for x in a:
	if x > b:
		continue
	total += x
	if total > d:
		count += 1
		total = 0
print(count)


inp1 = list(map(int, input().rstrip().split()))
inp2 = list(map(int, input().rstrip().split()))
s = 0
c = 0
for i in inp2:
	if i > inp1[1]:
		continue
	else:
		s += i
		if s > inp1[2]:
			s = 0
			c += 1
print(c)


(n, b, d) = map(int, input().split())
sizes = list(map(int, input().split()))
counter = 0
empties = 0
for size in sizes:
	if size <= b:
		counter += size
		if counter > d:
			counter = 0
			empties += 1
print(empties)