from copy import deepcopy

import sys

from itertools import accumulate

N,X = list(map(int,input().split()))

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



ruiseki = accumulate(Llist)

for i,r in enumerate(ruiseki,2):

    if r <= X:

        continue

    else:

        print((i-1))

        sys.exit()

print(i)
N, X = list(map(int, input().split()))

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

now = 0

ans = 1

for i in range(N):

    now += Llist[i]

    if now <= X:

        ans += 1

print(ans)

from copy import deepcopy
import sys
from itertools import accumulate

N, X = list(map(int, input().split()))
Llist = list(map(int, input().split()))
ruiseki = accumulate(Llist)
for i, r in enumerate(ruiseki, 2):
    if r <= X:
        continue
    else:
        print((i - 1))
        sys.exit()
print(i)

N, X = list(map(int, input().split()))
Llist = list(map(int, input().split()))
now = 0
ans = 1
for i in range(N):
    now += Llist[i]
    if now <= X:
        ans += 1
print(ans)

-from copy import deepcopy -import sys -from itertools import accumulate - -ruiseki = accumulate(Llist) -for i, r in enumerate(ruiseki, 2): -    if r <= X: -        continue -    else: -        print((i - 1)) -        sys.exit() -print(i) +now = 0 +ans = 1 +for i in range(N): +    now += Llist[i] +    if now <= X: +        ans += 1 +print(ans)