# AtCoder Beginner Contest 130
# B - Bounding
import bisect

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

accumu_L=[0]

for i in range (N):
    accumu_L.append(accumu_L[-1]+L[i])

# print(accumu_L)

print(bisect.bisect_right(accumu_L,X)) import bisect bisect N,X=map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split X L=list(map(int,input().split())) L list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split accumu_L=[0] accumu_L [0] 0 for i in range (N):
    accumu_L.append(accumu_L[-1]+L[i])

# print(accumu_L) i range (N) range N accumu_L.append(accumu_L[-1]+L[i]) accumu_L.append accumu_L append accumu_L[-1]+L[i] accumu_L[-1] accumu_L -1 L[i] L i print(bisect.bisect_right(accumu_L,X)) print bisect.bisect_right(accumu_L,X) bisect.bisect_right bisect bisect_right accumu_L X L=list(map(int,input().split())) list(map(int,input().split())) L accumu_L=[0] [0] accumu_L X=map(int,input().split()) map(int,input().split()) X N,X=map(int,input().split()) map(int,input().split()) N
# AtCoder Beginner Contest 130
# B - Bounding
import bisect

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

accumu_L=[0]

for i in range (N):
    accumu_L.append(accumu_L[-1]+L[i])

# print(accumu_L)

print(bisect.bisect_right(accumu_L,X))