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

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


ans = 0

d = 0

for i in range(n):
    if d <= x:
        ans += 1
    d += l[i]

if d <= x:
    ans += 1

print(ans) 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 ans = 0 ans 0 d = 0 d 0 for i in range(n):
    if d <= x:
        ans += 1
    d += l[i] i range(n) range n if d <= x:
        ans += 1
     d <= x d x ans += 1 ans 1 d += l[i] d l[i] l i if d <= x:
    ans += 1 d <= x d x ans += 1 ans 1 print(ans) print ans ans = 0 0 ans n, x = map(int, input().split()) map(int, input().split()) n ans += 1 1 ans ans += 1 1 ans l = list(map(int, input().split())) list(map(int, input().split())) l d += l[i] l[i] d x = map(int, input().split()) map(int, input().split()) x d = 0 0 d
n, x = map(int, input().split())

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


ans = 0

d = 0

for i in range(n):
    if d <= x:
        ans += 1
    d += l[i]

if d <= x:
    ans += 1

print(ans)