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