https://www.acmicpc.net/problem/13335
import sys
from collections import deque
input = sys.stdin.readline
n, w, l = map(int, input().split())
car = deque(list(map(int, input().split())))
bridge = deque([0] * w)
cnt = 0
while bridge:
cnt += 1
bridge.popleft()
if car:
if sum(bridge) + car[0] <= l:
bridge.append(car.popleft())
else:
bridge.append(0)
print(cnt)