import sys
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり

N,X = MI()
L = LI()

a = 0
ans = 1
for i in range(N):
    a += L[i]
    if a <= X:
        ans += 1

print(ans) import sys sys def MI(): return map(int,sys.stdin.readline().rstrip().split()) MI def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり LI N,X = MI() N MI() MI X L = LI() L LI() LI a = 0 a 0 ans = 1 ans 1 for i in range(N):
    a += L[i]
    if a <= X:
        ans += 1 i range(N) range N a += L[i] a L[i] L i if a <= X:
        ans += 1 a <= X a X ans += 1 ans 1 print(ans) print ans ans += 1 1 ans def MI(): return map(int,sys.stdin.readline().rstrip().split()) def MI(): return map(int,sys.stdin.readline().rstrip().split()) MI def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり LI ans = 1 1 ans X = MI() MI() X L = LI() LI() L a += L[i] L[i] a N,X = MI() MI() N a = 0 0 a
import sys
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり

N,X = MI()
L = LI()

a = 0
ans = 1
for i in range(N):
    a += L[i]
    if a <= X:
        ans += 1

print(ans)
