x = list(map(int, input().split()))[1]
l = list(map(int, input().split()))
m = [0]
for i in l:
    if i+m[-1] <= x:
        m.append(i+m[-1])
    else:
        break
print(len(m)) x = list(map(int, input().split()))[1] x list(map(int, input().split()))[1] (map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split 1 l = list(map(int, input().split())) l list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split m = [0] m [0] 0 for i in l:
    if i+m[-1] <= x:
        m.append(i+m[-1])
    else:
        break i l if i+m[-1] <= x:
        m.append(i+m[-1])
    else:
        break i+m[-1] <= x i+m[-1] i m[-1] m -1 x m.append(i+m[-1]) m.append m append i+m[-1] i m[-1] m -1 break print(len(m)) print len(m) len m m = [0] [0] m x = list(map(int, input().split()))[1] list(map(int, input().split()))[1] x l = list(map(int, input().split())) list(map(int, input().split())) l
x = list(map(int, input().split()))[1]
l = list(map(int, input().split()))
m = [0]
for i in l:
    if i+m[-1] <= x:
        m.append(i+m[-1])
    else:
        break
print(len(m))