n,x=map(int,input().split())
L=list(map(int,input().split()))
p,ans=0,1
for i in range(n):
    if p+L[i]<=x:
        p+=L[i]
        ans+=1
    else:
        break
print(ans) 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 p,ans=0,1 p 0 ans 1 for i in range(n):
    if p+L[i]<=x:
        p+=L[i]
        ans+=1
    else:
        break i range(n) range n if p+L[i]<=x:
        p+=L[i]
        ans+=1
    else:
        break p+L[i]<=x p+L[i] p L[i] L i x p+=L[i] p L[i] L i ans+=1 ans 1 break print(ans) print ans p,ans=0,1 0 p x=map(int,input().split()) map(int,input().split()) x ans=0,1 1 ans n,x=map(int,input().split()) map(int,input().split()) n L=list(map(int,input().split())) list(map(int,input().split())) L p+=L[i] L[i] p ans+=1 1 ans
n,x=map(int,input().split())
L=list(map(int,input().split()))
p,ans=0,1
for i in range(n):
    if p+L[i]<=x:
        p+=L[i]
        ans+=1
    else:
        break
print(ans)