N,X = map(int,input().split())
l=[0]
l += list(map(int,input().split()))
sum=0
for i in range(N+1):
    sum += l[i]
    if sum>X:
        print(i)
        exit()
print(N+1) N,X = map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split X l=[0] l [0] 0 l += list(map(int,input().split())) l list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split sum=0 sum 0 for i in range(N+1):
    sum += l[i]
    if sum>X:
        print(i)
        exit() i range(N+1) range N+1 N 1 sum += l[i] sum l[i] l i if sum>X:
        print(i)
        exit() sum>X sum X print(i) print i exit() exit print(N+1) print N+1 N 1 sum += l[i] l[i] sum l += list(map(int,input().split())) list(map(int,input().split())) l sum=0 0 sum N,X = map(int,input().split()) map(int,input().split()) N l=[0] [0] l X = map(int,input().split()) map(int,input().split()) X
N,X = map(int,input().split())
l=[0]
l += list(map(int,input().split()))
sum=0
for i in range(N+1):
    sum += l[i]
    if sum>X:
        print(i)
        exit()
print(N+1)
