n,x = map(int,input().split())
a = list(map(int,input().split()))
a.append(0)
count = 0
b = 0
for i in range(n+1):
    if b > x:
        break
    count+=1
    b+= a[i]
print(count) n,x = map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split x a = list(map(int,input().split())) a list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split a.append(0) a.append a append 0 count = 0 count 0 b = 0 b 0 for i in range(n+1):
    if b > x:
        break
    count+=1
    b+= a[i] i range(n+1) range n+1 n 1 if b > x:
        break
     b > x b x break count+=1 count 1 b+= a[i] b a[i] a i print(count) print count count = 0 0 count b = 0 0 b n,x = map(int,input().split()) map(int,input().split()) n count+=1 1 count b+= a[i] a[i] b a = list(map(int,input().split())) list(map(int,input().split())) a x = map(int,input().split()) map(int,input().split()) x
n,x = map(int,input().split())
a = list(map(int,input().split()))
a.append(0)
count = 0
b = 0
for i in range(n+1):
    if b > x:
        break
    count+=1
    b+= a[i]
print(count)