n, x = map(int, input().split())
(*l,) = map(int, input().split())
a = [0]
for i in l:
    if a[-1] + i > x:
        break
    a.append(a[-1] + i)
print(len(a)) n, x = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split x (*l,) = map(int, input().split()) *l l map(int, input().split()) map int input().split() ().split () input split a = [0] a [0] 0 for i in l:
    if a[-1] + i > x:
        break
    a.append(a[-1] + i) i l if a[-1] + i > x:
        break
     a[-1] + i > x a[-1] + i a[-1] a -1 i x break a.append(a[-1] + i) a.append a append a[-1] + i a[-1] a -1 i print(len(a)) print len(a) len a a = [0] [0] a n, x = map(int, input().split()) map(int, input().split()) n x = map(int, input().split()) map(int, input().split()) x
n, x = map(int, input().split())
(*l,) = map(int, input().split())
a = [0]
for i in l:
    if a[-1] + i > x:
        break
    a.append(a[-1] + i)
print(len(a))