import math
import collections
import fractions
import itertools

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

if __name__ == "__main__":
    solve() import math math import collections collections import fractions fractions import itertools itertools def solve():
    n, x = map(int, input().split())
    l = list(map(int, input().split()))
    d = 0
    ans = 1
    for i in range(n):
        d = d + l[i]
        if d > x:
            break
        ans += 1
    print(ans)
    return 0 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 ans = 1 ans 1 for i in range(n):
        d = d + l[i]
        if d > x:
            break
        ans += 1
     i range(n) range n d = d + l[i] d d + l[i] d l[i] l i if d > x:
            break
         d > x d x break ans += 1 ans 1 print(ans) print ans return 0 0 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
    ans = 1
    for i in range(n):
        d = d + l[i]
        if d > x:
            break
        ans += 1
    print(ans)
    return 0 def solve():
    n, x = map(int, input().split())
    l = list(map(int, input().split()))
    d = 0
    ans = 1
    for i in range(n):
        d = d + l[i]
        if d > x:
            break
        ans += 1
    print(ans)
    return 0 solve
import math
import collections
import fractions
import itertools

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

if __name__ == "__main__":
    solve()
