import sys

sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inl = lambda: [int(x) for x in sys.stdin.readline().split()]
ins = lambda: sys.stdin.readline().rstrip()
debug = lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw))


def solve():
    N, X = inl()
    L = inl()
    cnt = 1
    d = 0
    for i in range(N):
        d += L[i]
        if d > X:
            break
        cnt += 1

    return cnt


print(solve())
 import sys sys sys.setrecursionlimit(10 ** 8) sys.setrecursionlimit sys setrecursionlimit 10 ** 8 10 8 ini = lambda: int(sys.stdin.readline()) ini lambda: int(sys.stdin.readline()) int(sys.stdin.readline()) int sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline int(x) for x in sys.stdin.readline().split() for x in sys.stdin.readline().split() x sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split for x in sys.stdin.readline().split() int(x) int x inl = lambda: [int(x) for x in sys.stdin.readline().split()] inl lambda: [int(x) for x in sys.stdin.readline().split()] [int(x) for x in sys.stdin.readline().split()] ins = lambda: sys.stdin.readline().rstrip() ins lambda: sys.stdin.readline().rstrip() sys.stdin.readline().rstrip() sys.stdin.readline().rstrip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline rstrip debug = lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw)) debug lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw)) print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw)) print "\033[33m" *a a "\033[0m" **dict(file=sys.stderr, **kw) dict(file=sys.stderr, **kw) dict file=sys.stderr file sys.stderr sys stderr **kw kw *a **kw def solve():
    N, X = inl()
    L = inl()
    cnt = 1
    d = 0
    for i in range(N):
        d += L[i]
        if d > X:
            break
        cnt += 1

    return cnt solve N, X = inl() N inl() inl X L = inl() L inl() inl cnt = 1 cnt 1 d = 0 d 0 for i in range(N):
        d += L[i]
        if d > X:
            break
        cnt += 1

     i range(N) range N d += L[i] d L[i] L i if d > X:
            break
         d > X d X break cnt += 1 cnt 1 return cnt cnt print(solve()) print solve() solve ins = lambda: sys.stdin.readline().rstrip() lambda: sys.stdin.readline().rstrip() ins inl = lambda: [int(x) for x in sys.stdin.readline().split()] lambda: [int(x) for x in sys.stdin.readline().split()] inl debug = lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw)) lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw)) debug ini = lambda: int(sys.stdin.readline()) lambda: int(sys.stdin.readline()) ini def solve():
    N, X = inl()
    L = inl()
    cnt = 1
    d = 0
    for i in range(N):
        d += L[i]
        if d > X:
            break
        cnt += 1

    return cnt def solve():
    N, X = inl()
    L = inl()
    cnt = 1
    d = 0
    for i in range(N):
        d += L[i]
        if d > X:
            break
        cnt += 1

    return cnt solve
import sys

sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inl = lambda: [int(x) for x in sys.stdin.readline().split()]
ins = lambda: sys.stdin.readline().rstrip()
debug = lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw))


def solve():
    N, X = inl()
    L = inl()
    cnt = 1
    d = 0
    for i in range(N):
        d += L[i]
        if d > X:
            break
        cnt += 1

    return cnt


print(solve())

