k=0
s=0
a,b=map(int,input().split())
L=list(map(int,input().split()))
for i in range(a):
  s+=L[i]
  if s<=b:
    k+=1
print(k+1) k=0 k 0 s=0 s 0 a,b=map(int,input().split()) a map(int,input().split()) map int input().split() ().split () input split b L=list(map(int,input().split())) L list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split for i in range(a):
  s+=L[i]
  if s<=b:
    k+=1 i range(a) range a s+=L[i] s L[i] L i if s<=b:
    k+=1 s<=b s b k+=1 k 1 print(k+1) print k+1 k 1 s=0 0 s a,b=map(int,input().split()) map(int,input().split()) a b=map(int,input().split()) map(int,input().split()) b k+=1 1 k k=0 0 k L=list(map(int,input().split())) list(map(int,input().split())) L s+=L[i] L[i] s
k=0
s=0
a,b=map(int,input().split())
L=list(map(int,input().split()))
for i in range(a):
  s+=L[i]
  if s<=b:
    k+=1
print(k+1)