n, x = list(map(int, input().split()))
l = list(map(int, input().split()))

c = 1
y = 0

for m in l:
    if y + m <= x:
        c += 1
        y += m
    else:
        break

print(c)
 n, x = list(map(int, input().split())) n list(map(int, input().split())) list 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 = 1 c 1 y = 0 y 0 for m in l:
    if y + m <= x:
        c += 1
        y += m
    else:
        break m l if y + m <= x:
        c += 1
        y += m
    else:
        break y + m <= x y + m y m x c += 1 c 1 y += m y m break print(c) print c c = 1 1 c c += 1 1 c l = list(map(int, input().split())) list(map(int, input().split())) l y = 0 0 y y += m m y x = list(map(int, input().split())) list(map(int, input().split())) x n, x = list(map(int, input().split())) list(map(int, input().split())) n
n, x = list(map(int, input().split()))
l = list(map(int, input().split()))

c = 1
y = 0

for m in l:
    if y + m <= x:
        c += 1
        y += m
    else:
        break

print(c)

