from bisect import bisect_right
N, X = map(int, input().split())
L = list(map(int, input().split()))
s = [0] * (N+1)
for i in range(N):
	s[i+1] = s[i] + L[i]
pos = bisect_right(s, X)
print(pos) from bisect import bisect_right 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 s = [0] * (N+1) s [0] * (N+1) [0] 0 N+1 N 1 for i in range(N):
	s[i+1] = s[i] + L[i] i range(N) range N s[i+1] = s[i] + L[i] s[i+1] s i+1 i 1 s[i] + L[i] s[i] s i L[i] L i pos = bisect_right(s, X) pos bisect_right(s, X) bisect_right s X print(pos) print pos N, X = map(int, input().split()) map(int, input().split()) N s = [0] * (N+1) [0] * (N+1) s L = list(map(int, input().split())) list(map(int, input().split())) L X = map(int, input().split()) map(int, input().split()) X pos = bisect_right(s, X) bisect_right(s, X) pos
from bisect import bisect_right
N, X = map(int, input().split())
L = list(map(int, input().split()))
s = [0] * (N+1)
for i in range(N):
	s[i+1] = s[i] + L[i]
pos = bisect_right(s, X)
print(pos)