import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


INF = float('inf')


n, x = LI()
l = LI()
cnt = 1
d = 0
for i in range(n):
    # print(f'{(d, l[i])=}')
    if d + l[i] <= x:
        cnt += 1
        d += l[i]
    else:
        break
print(cnt) import sys sys def input(): return sys.stdin.readline().strip() input def I(): return int(input()) I def LI(): return list(map(int, input().split())) LI I() for i in range(n) for i in range(n) i range(n) range n for i in range(n) I() I def IR(n): return [I() for i in range(n)] IR n n LI() for i in range(n) for i in range(n) i range(n) range n for i in range(n) LI() LI def LIR(n): return [LI() for i in range(n)] LIR n n S() for i in range(n) for i in range(n) i range(n) range n for i in range(n) S() S def SR(n): return [S() for i in range(n)] SR n n def S(): return input() S def LS(): return input().split() LS INF = float('inf') INF float('inf') float 'inf' n, x = LI() n LI() LI x l = LI() l LI() LI cnt = 1 cnt 1 d = 0 d 0 for i in range(n):
    # print(f'{(d, l[i])=}')
    if d + l[i] <= x:
        cnt += 1
        d += l[i]
    else:
        break i range(n) range n if d + l[i] <= x:
        cnt += 1
        d += l[i]
    else:
        break d + l[i] <= x d + l[i] d l[i] l i x cnt += 1 cnt 1 d += l[i] d l[i] l i break print(cnt) print cnt def LS(): return input().split() def LS(): return input().split() LS d += l[i] l[i] d d = 0 0 d def LI(): return list(map(int, input().split())) def LI(): return list(map(int, input().split())) LI n, x = LI() LI() n l = LI() LI() l x = LI() LI() x cnt = 1 1 cnt def LIR(n): return [LI() for i in range(n)] def LIR(n): return [LI() for i in range(n)] LIR def SR(n): return [S() for i in range(n)] def SR(n): return [S() for i in range(n)] SR def S(): return input() def S(): return input() S def input(): return sys.stdin.readline().strip() def input(): return sys.stdin.readline().strip() input INF = float('inf') float('inf') INF cnt += 1 1 cnt def IR(n): return [I() for i in range(n)] def IR(n): return [I() for i in range(n)] IR def I(): return int(input()) def I(): return int(input()) I
import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


INF = float('inf')


n, x = LI()
l = LI()
cnt = 1
d = 0
for i in range(n):
    # print(f'{(d, l[i])=}')
    if d + l[i] <= x:
        cnt += 1
        d += l[i]
    else:
        break
print(cnt)
