#!/usr/bin/env python3
n, x, *l = map(int, open(0).read().split())
a = n+1
i=sum(l)
while a > 1 and i>x:
    a -= 1
    i-=l[a-1]
print(a) 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 a = n+1 a n+1 n 1 i=sum(l) i sum(l) sum l while a > 1 and i>x:
    a -= 1
    i-=l[a-1] a > 1 and i>x a > 1 a 1 i>x i x a -= 1 a 1 i-=l[a-1] i l[a-1] l a-1 a 1 print(a) print a i-=l[a-1] l[a-1] i n, x, *l = map(int, open(0).read().split()) map(int, open(0).read().split()) n a -= 1 1 a i=sum(l) sum(l) i x, *l = map(int, open(0).read().split()) map(int, open(0).read().split()) x a = n+1 n+1 a
#!/usr/bin/env python3
n, x, *l = map(int, open(0).read().split())
a = n+1
i=sum(l)
while a > 1 and i>x:
    a -= 1
    i-=l[a-1]
print(a)
