# coding: utf-8
# Your code here!
N,X=map(int, input().split())
List=list(map(int, input().split()))
bow=0
cnt=1
for i in range(0,N):
    bow+=List[i]
    if bow>X:
        break
    else:
        cnt+=1

print(cnt) N,X=map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split X List=list(map(int, input().split())) List list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split bow=0 bow 0 cnt=1 cnt 1 for i in range(0,N):
    bow+=List[i]
    if bow>X:
        break
    else:
        cnt+=1 i range(0,N) range 0 N bow+=List[i] bow List[i] List i if bow>X:
        break
    else:
        cnt+=1 bow>X bow X break cnt+=1 cnt 1 print(cnt) print cnt cnt+=1 1 cnt bow+=List[i] List[i] bow bow=0 0 bow List=list(map(int, input().split())) list(map(int, input().split())) List N,X=map(int, input().split()) map(int, input().split()) N X=map(int, input().split()) map(int, input().split()) X cnt=1 1 cnt
# coding: utf-8
# Your code here!
N,X=map(int, input().split())
List=list(map(int, input().split()))
bow=0
cnt=1
for i in range(0,N):
    bow+=List[i]
    if bow>X:
        break
    else:
        cnt+=1

print(cnt)