import sys, math
from collections import defaultdict, deque, Counter
from bisect import bisect_left, bisect_right
from itertools import combinations, permutations, product
from heapq import heappush, heappop
from functools import lru_cache
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 1000000007
sys.setrecursionlimit(1000000)

N, X = rl()
L = rl()

ans = 1
l = 0
for i in range(N):
	l += L[i]
	if l <= X:
		ans += 1
	else:
		break
print(ans) import sys, math sys math from collections import defaultdict, deque, Counter from bisect import bisect_left, bisect_right from itertools import combinations, permutations, product from heapq import heappush, heappop from functools import lru_cache input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline rs = lambda: input().strip() rs lambda: input().strip() input().strip() ().strip () input strip ri = lambda: int(input()) ri lambda: int(input()) int(input()) int input() input rl = lambda: list(map(int, input().split())) rl lambda: list(map(int, input().split())) list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split mod = 1000000007 mod 1000000007 sys.setrecursionlimit(1000000) sys.setrecursionlimit sys setrecursionlimit 1000000 N, X = rl() N rl() rl X L = rl() L rl() rl ans = 1 ans 1 l = 0 l 0 for i in range(N):
	l += L[i]
	if l <= X:
		ans += 1
	else:
		break i range(N) range N l += L[i] l L[i] L i if l <= X:
		ans += 1
	else:
		break l <= X l X ans += 1 ans 1 break print(ans) print ans input = sys.stdin.readline sys.stdin.readline input rs = lambda: input().strip() lambda: input().strip() rs N, X = rl() rl() N rl = lambda: list(map(int, input().split())) lambda: list(map(int, input().split())) rl X = rl() rl() X ans += 1 1 ans L = rl() rl() L ri = lambda: int(input()) lambda: int(input()) ri mod = 1000000007 1000000007 mod l += L[i] L[i] l ans = 1 1 ans l = 0 0 l
import sys, math
from collections import defaultdict, deque, Counter
from bisect import bisect_left, bisect_right
from itertools import combinations, permutations, product
from heapq import heappush, heappop
from functools import lru_cache
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 1000000007
sys.setrecursionlimit(1000000)

N, X = rl()
L = rl()

ans = 1
l = 0
for i in range(N):
	l += L[i]
	if l <= X:
		ans += 1
	else:
		break
print(ans)
