from itertools import accumulate

n, x = map(int, input().split())
L = list(map(int, input().split()))
C = [0] + list(accumulate(L))
#print(C)

cnt = 0
for c in C:
    if c <= x:
        cnt += 1
print(cnt) from itertools import accumulate n, x = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split x L = list(map(int, input().split())) L list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split C = [0] + list(accumulate(L)) C [0] + list(accumulate(L)) [0] 0 list(accumulate(L)) list accumulate(L) accumulate L cnt = 0 cnt 0 for c in C:
    if c <= x:
        cnt += 1 c C if c <= x:
        cnt += 1 c <= x c x cnt += 1 cnt 1 print(cnt) print cnt L = list(map(int, input().split())) list(map(int, input().split())) L n, x = map(int, input().split()) map(int, input().split()) n C = [0] + list(accumulate(L)) [0] + list(accumulate(L)) C cnt = 0 0 cnt x = map(int, input().split()) map(int, input().split()) x cnt += 1 1 cnt
from itertools import accumulate

n, x = map(int, input().split())
L = list(map(int, input().split()))
C = [0] + list(accumulate(L))
#print(C)

cnt = 0
for c in C:
    if c <= x:
        cnt += 1
print(cnt)