def solve():
    n, x = map(int, input().split())
    l = list(map(int, input().split()))
    d = 0
    count = 1
    for i in range(1, n+1):
        d = d + l[i-1]
        if d > x:
            print(count)
            exit()
        count += 1
    print(count)


if __name__ == '__main__':
    solve() def solve():
    n, x = map(int, input().split())
    l = list(map(int, input().split()))
    d = 0
    count = 1
    for i in range(1, n+1):
        d = d + l[i-1]
        if d > x:
            print(count)
            exit()
        count += 1
    print(count) solve 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 d = 0 d 0 count = 1 count 1 for i in range(1, n+1):
        d = d + l[i-1]
        if d > x:
            print(count)
            exit()
        count += 1
     i range(1, n+1) range 1 n+1 n 1 d = d + l[i-1] d d + l[i-1] d l[i-1] l i-1 i 1 if d > x:
            print(count)
            exit()
         d > x d x print(count) print count exit() exit count += 1 count 1 print(count) print count if __name__ == '__main__':
    solve() __name__ == '__main__' __name__ '__main__' solve() solve def solve():
    n, x = map(int, input().split())
    l = list(map(int, input().split()))
    d = 0
    count = 1
    for i in range(1, n+1):
        d = d + l[i-1]
        if d > x:
            print(count)
            exit()
        count += 1
    print(count) def solve():
    n, x = map(int, input().split())
    l = list(map(int, input().split()))
    d = 0
    count = 1
    for i in range(1, n+1):
        d = d + l[i-1]
        if d > x:
            print(count)
            exit()
        count += 1
    print(count) solve
def solve():
    n, x = map(int, input().split())
    l = list(map(int, input().split()))
    d = 0
    count = 1
    for i in range(1, n+1):
        d = d + l[i-1]
        if d > x:
            print(count)
            exit()
        count += 1
    print(count)


if __name__ == '__main__':
    solve()
