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