a,b=map(int,input().split())
l=list(map(int,input().split()))
c=[0]
count=1
for i in range(a):
    c.append(c[i]+l[i])
    if(c[i+1]<=b):
        count+=1
print(count) 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 c=[0] c [0] 0 count=1 count 1 for i in range(a):
    c.append(c[i]+l[i])
    if(c[i+1]<=b):
        count+=1 i range(a) range a c.append(c[i]+l[i]) c.append c append c[i]+l[i] c[i] c i l[i] l i if(c[i+1]<=b):
        count+=1 c[i+1]<=b c[i+1] c i+1 i 1 b count+=1 count 1 print(count) print count a,b=map(int,input().split()) map(int,input().split()) a b=map(int,input().split()) map(int,input().split()) b l=list(map(int,input().split())) list(map(int,input().split())) l c=[0] [0] c count+=1 1 count count=1 1 count
a,b=map(int,input().split())
l=list(map(int,input().split()))
c=[0]
count=1
for i in range(a):
    c.append(c[i]+l[i])
    if(c[i+1]<=b):
        count+=1
print(count)