n, x = map(int, input().split())
lst = [0] + list(map(int, input().split()))
cnt = 0
for i in range(n + 1):
  cnt += lst[i]
  if cnt > x:
    print(i)
    exit()
print(n + 1) n, x = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split x lst = [0] + list(map(int, input().split())) lst [0] + list(map(int, input().split())) [0] 0 list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split cnt = 0 cnt 0 for i in range(n + 1):
  cnt += lst[i]
  if cnt > x:
    print(i)
    exit() i range(n + 1) range n + 1 n 1 cnt += lst[i] cnt lst[i] lst i if cnt > x:
    print(i)
    exit() cnt > x cnt x print(i) print i exit() exit print(n + 1) print n + 1 n 1 lst = [0] + list(map(int, input().split())) [0] + list(map(int, input().split())) lst cnt = 0 0 cnt x = map(int, input().split()) map(int, input().split()) x n, x = map(int, input().split()) map(int, input().split()) n cnt += lst[i] lst[i] cnt
n, x = map(int, input().split())
lst = [0] + list(map(int, input().split()))
cnt = 0
for i in range(n + 1):
  cnt += lst[i]
  if cnt > x:
    print(i)
    exit()
print(n + 1)