import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

N, X = mapint()
Ls = list(mapint())

now = 0
cnt = 0
for l in Ls:
    if now>X:
        break
    now += l
    cnt += 1
else:
    if now<=X:
        cnt += 1
print(cnt) import sys sys def input(): return sys.stdin.readline().strip() input def mapint(): return map(int, input().split()) mapint sys.setrecursionlimit(10**9) sys.setrecursionlimit sys setrecursionlimit 10**9 10 9 N, X = mapint() N mapint() mapint X Ls = list(mapint()) Ls list(mapint()) list mapint() mapint now = 0 now 0 cnt = 0 cnt 0 for l in Ls:
    if now>X:
        break
    now += l
    cnt += 1
else:
    if now<=X:
        cnt += 1 l Ls if now>X:
        break
     now>X now X break now += l now l cnt += 1 cnt 1 if now<=X:
        cnt += 1 now<=X now X cnt += 1 cnt 1 print(cnt) print cnt def mapint(): return map(int, input().split()) def mapint(): return map(int, input().split()) mapint def input(): return sys.stdin.readline().strip() def input(): return sys.stdin.readline().strip() input now = 0 0 now X = mapint() mapint() X cnt = 0 0 cnt cnt += 1 1 cnt N, X = mapint() mapint() N now += l l now cnt += 1 1 cnt Ls = list(mapint()) list(mapint()) Ls
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

N, X = mapint()
Ls = list(mapint())

now = 0
cnt = 0
for l in Ls:
    if now>X:
        break
    now += l
    cnt += 1
else:
    if now<=X:
        cnt += 1
print(cnt)