n,x = map(int,input().split())
l = [int(x) for x in input().split()]

save = 1
for i in range(1,n+2):
    if(i==1):
        d = 0
        continue
    d = d + l[i-2]
    if(d > x):
        break
    save = i
    
print(save) n,x = map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split x int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x l = [int(x) for x in input().split()] l [int(x) for x in input().split()] save = 1 save 1 for i in range(1,n+2):
    if(i==1):
        d = 0
        continue
    d = d + l[i-2]
    if(d > x):
        break
    save = i
     i range(1,n+2) range 1 n+2 n 2 if(i==1):
        d = 0
        continue
     i==1 i 1 d = 0 d 0 continue d = d + l[i-2] d d + l[i-2] d l[i-2] l i-2 i 2 if(d > x):
        break
     d > x d x break save = i save i print(save) print save n,x = map(int,input().split()) map(int,input().split()) n l = [int(x) for x in input().split()] [int(x) for x in input().split()] l d = d + l[i-2] d + l[i-2] d x = map(int,input().split()) map(int,input().split()) x d = 0 0 d save = i i save save = 1 1 save
n,x = map(int,input().split())
l = [int(x) for x in input().split()]

save = 1
for i in range(1,n+2):
    if(i==1):
        d = 0
        continue
    d = d + l[i-2]
    if(d > x):
        break
    save = i
    
print(save)