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