import sys

import numpy as np



sr = lambda: sys.stdin.readline().rstrip()

ir = lambda: int(sr())

lr = lambda: list(map(int, sr().split()))



N, X = lr()

L = np.array([0] + lr())

Lcum = L.cumsum()

i = np.searchsorted(Lcum, X, side='right')

print(i)

# 
# coding: utf-8

import sys



sr = lambda: sys.stdin.readline().rstrip()

ir = lambda: int(sr())

lr = lambda: list(map(int, sr().split()))



N, X = lr()

L = lr()

cnt = 1

cur = 0

for l in L:   

    cur += l

    if cur > X:

        break

    cnt += 1



answer = cnt

print(answer)

import sys
import numpy as np

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))
N, X = lr()
L = np.array([0] + lr())
Lcum = L.cumsum()
i = np.searchsorted(Lcum, X, side="right")
print(i)
#

# coding: utf-8
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))
N, X = lr()
L = lr()
cnt = 1
cur = 0
for l in L:
    cur += l
    if cur > X:
        break
    cnt += 1
answer = cnt
print(answer)

+# coding: utf-8 -import numpy as np -L = np.array([0] + lr()) -Lcum = L.cumsum() -i = np.searchsorted(Lcum, X, side="right") -print(i) -# +L = lr() +cnt = 1 +cur = 0 +for l in L: +    cur += l +    if cur > X: +        break +    cnt += 1 +answer = cnt +print(answer)