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