import sys
sys.setrecursionlimit(10**6)

#a = int(input())
#b = list(map(int, input().split()))
n, x = map(int, input().split())
#s = input()
#s,t = input().split()
#
readline = sys.stdin.readline
l = [int(i) for i in readline().split()]
#ab = [[int(i) for i in readline().split()] for _ in range(n)]

ans = 1
height = 0
for i in range(n):
    height += l[i]
    if height <= x:
        ans += 1
    else:
        break
print(ans) import sys sys sys.setrecursionlimit(10**6) sys.setrecursionlimit sys setrecursionlimit 10**6 10 6 n, x = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split x readline = sys.stdin.readline readline sys.stdin.readline sys.stdin sys stdin readline int(i) for i in readline().split() for i in readline().split() i readline().split() ().split () readline split for i in readline().split() int(i) int i l = [int(i) for i in readline().split()] l [int(i) for i in readline().split()] ans = 1 ans 1 height = 0 height 0 for i in range(n):
    height += l[i]
    if height <= x:
        ans += 1
    else:
        break i range(n) range n height += l[i] height l[i] l i if height <= x:
        ans += 1
    else:
        break height <= x height x ans += 1 ans 1 break print(ans) print ans readline = sys.stdin.readline sys.stdin.readline readline l = [int(i) for i in readline().split()] [int(i) for i in readline().split()] l ans += 1 1 ans height = 0 0 height n, x = map(int, input().split()) map(int, input().split()) n ans = 1 1 ans height += l[i] l[i] height x = map(int, input().split()) map(int, input().split()) x
import sys
sys.setrecursionlimit(10**6)

#a = int(input())
#b = list(map(int, input().split()))
n, x = map(int, input().split())
#s = input()
#s,t = input().split()
#
readline = sys.stdin.readline
l = [int(i) for i in readline().split()]
#ab = [[int(i) for i in readline().split()] for _ in range(n)]

ans = 1
height = 0
for i in range(n):
    height += l[i]
    if height <= x:
        ans += 1
    else:
        break
print(ans)