n,x = map(int,input().split())
L = list(map(int,input().split()))
cnt = 0
d = 0
for i,l in enumerate(L):
    if d +L[i]<=x:
        d += L[i]
    else:
        print(i+1);exit()
    
print(n+1) 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 cnt = 0 cnt 0 d = 0 d 0 for i,l in enumerate(L):
    if d +L[i]<=x:
        d += L[i]
    else:
        print(i+1);exit()
     i l enumerate(L) enumerate L if d +L[i]<=x:
        d += L[i]
    else:
        print(i+1);exit()
     d +L[i]<=x d +L[i] d L[i] L i x d += L[i] d L[i] L i print(i+1) print i+1 i 1 exit() exit print(n+1) print n+1 n 1 n,x = map(int,input().split()) map(int,input().split()) n x = map(int,input().split()) map(int,input().split()) x d += L[i] L[i] d L = list(map(int,input().split())) list(map(int,input().split())) L cnt = 0 0 cnt d = 0 0 d
n,x = map(int,input().split())
L = list(map(int,input().split()))
cnt = 0
d = 0
for i,l in enumerate(L):
    if d +L[i]<=x:
        d += L[i]
    else:
        print(i+1);exit()
    
print(n+1)
