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

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

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