import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
n, x = M()
l = LI()
wa = 0
ans = 1
for i in l:
    wa += i
    if wa <= x:
        ans += 1
    else:
        break
print(ans) import bisect,collections,copy,heapq,itertools,math,string bisect collections copy heapq itertools math string import sys sys def S(): return sys.stdin.readline().rstrip() S def M(): return map(int,sys.stdin.readline().rstrip().split()) M def I(): return int(sys.stdin.readline().rstrip()) I def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) LI def LS(): return list(sys.stdin.readline().rstrip().split()) LS n, x = M() n M() M x l = LI() l LI() LI wa = 0 wa 0 ans = 1 ans 1 for i in l:
    wa += i
    if wa <= x:
        ans += 1
    else:
        break i l wa += i wa i if wa <= x:
        ans += 1
    else:
        break wa <= x wa x ans += 1 ans 1 break print(ans) print ans ans = 1 1 ans ans += 1 1 ans wa += i i wa def LS(): return list(sys.stdin.readline().rstrip().split()) def LS(): return list(sys.stdin.readline().rstrip().split()) LS wa = 0 0 wa def I(): return int(sys.stdin.readline().rstrip()) def I(): return int(sys.stdin.readline().rstrip()) I def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) LI n, x = M() M() n def S(): return sys.stdin.readline().rstrip() def S(): return sys.stdin.readline().rstrip() S def M(): return map(int,sys.stdin.readline().rstrip().split()) def M(): return map(int,sys.stdin.readline().rstrip().split()) M x = M() M() x l = LI() LI() l
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
n, x = M()
l = LI()
wa = 0
ans = 1
for i in l:
    wa += i
    if wa <= x:
        ans += 1
    else:
        break
print(ans)