满分答案:
n,k = map(int,input().split())
cake = [0 for i in range(n)]
cake = input().split()
count = 0
w = 0
for i in range(n):
cake[i] = int(cake[i])
w = w + cake[i]
if w >= k:
count = count + 1
w = 0
elif i == n-1 and w < k:
count = count + 1
print(count)