n,x,*l=map(int,open(0).read().split())
c,d=1,0
for i in range(n):
    d+=l[i]
    if d>x:
        print(c)
        break
    else:
        c+=1
else:
    print(c) n,x,*l=map(int,open(0).read().split()) n map(int,open(0).read().split()) map int open(0).read().split() (0).read().split (0).read() (0).read (0) open 0 read split x *l l c,d=1,0 c 1 d 0 for i in range(n):
    d+=l[i]
    if d>x:
        print(c)
        break
    else:
        c+=1
else:
    print(c) i range(n) range n d+=l[i] d l[i] l i if d>x:
        print(c)
        break
    else:
        c+=1 d>x d x print(c) print c break c+=1 c 1 print(c) print c d=1,0 0 d d+=l[i] l[i] d c+=1 1 c n,x,*l=map(int,open(0).read().split()) map(int,open(0).read().split()) n x,*l=map(int,open(0).read().split()) map(int,open(0).read().split()) x c,d=1,0 1 c
n,x,*l=map(int,open(0).read().split())
c,d=1,0
for i in range(n):
    d+=l[i]
    if d>x:
        print(c)
        break
    else:
        c+=1
else:
    print(c)