import sys
sys.setrecursionlimit(10**9)

def mi(): return map(int,input().split())
def ii(): return int(input())
def isp(): return input().split()
def deb(text): print("-------\n{}\n-------".format(text))

INF=10**20
def main():
    N,X=mi()
    L=list(mi())

    d = 0
    ans = 1
    for i in range(N):
        d = d + L[i]
        ans += d <= X

    print(ans)



if __name__ == "__main__":
    main() import sys sys sys.setrecursionlimit(10**9) sys.setrecursionlimit sys setrecursionlimit 10**9 10 9 def mi(): return map(int,input().split()) mi def ii(): return int(input()) ii def isp(): return input().split() isp def deb(text): print("-------\n{}\n-------".format(text)) deb text text INF=10**20 INF 10**20 10 20 def main():
    N,X=mi()
    L=list(mi())

    d = 0
    ans = 1
    for i in range(N):
        d = d + L[i]
        ans += d <= X

    print(ans) main N,X=mi() N mi() mi X L=list(mi()) L list(mi()) list mi() mi d = 0 d 0 ans = 1 ans 1 for i in range(N):
        d = d + L[i]
        ans += d <= X

     i range(N) range N d = d + L[i] d d + L[i] d L[i] L i ans += d <= X ans d <= X d X print(ans) print ans if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def ii(): return int(input()) def ii(): return int(input()) ii INF=10**20 10**20 INF def deb(text): print("-------\n{}\n-------".format(text)) def deb(text): print("-------\n{}\n-------".format(text)) deb def isp(): return input().split() def isp(): return input().split() isp def main():
    N,X=mi()
    L=list(mi())

    d = 0
    ans = 1
    for i in range(N):
        d = d + L[i]
        ans += d <= X

    print(ans) def main():
    N,X=mi()
    L=list(mi())

    d = 0
    ans = 1
    for i in range(N):
        d = d + L[i]
        ans += d <= X

    print(ans) main def mi(): return map(int,input().split()) def mi(): return map(int,input().split()) mi
import sys
sys.setrecursionlimit(10**9)

def mi(): return map(int,input().split())
def ii(): return int(input())
def isp(): return input().split()
def deb(text): print("-------\n{}\n-------".format(text))

INF=10**20
def main():
    N,X=mi()
    L=list(mi())

    d = 0
    ans = 1
    for i in range(N):
        d = d + L[i]
        ans += d <= X

    print(ans)



if __name__ == "__main__":
    main()