N, X = map(int, input().split())
L = [int(l) for l in input().split()]
if sum(L) <= X:
  print(N+1)
  exit()
D = 0
ans = 1
for i in range(N):
  D += L[i]
  if D <= X:
    ans += 1
  else:
    print(ans)
    exit() N, X = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split X int(l) for l in input().split() for l in input().split() l input().split() ().split () input split for l in input().split() int(l) int l L = [int(l) for l in input().split()] L [int(l) for l in input().split()] if sum(L) <= X:
  print(N+1)
  exit() sum(L) <= X sum(L) sum L X print(N+1) print N+1 N 1 exit() exit D = 0 D 0 ans = 1 ans 1 for i in range(N):
  D += L[i]
  if D <= X:
    ans += 1
  else:
    print(ans)
    exit() i range(N) range N D += L[i] D L[i] L i if D <= X:
    ans += 1
  else:
    print(ans)
    exit() D <= X D X ans += 1 ans 1 print(ans) print ans exit() exit ans += 1 1 ans D += L[i] L[i] D N, X = map(int, input().split()) map(int, input().split()) N D = 0 0 D X = map(int, input().split()) map(int, input().split()) X L = [int(l) for l in input().split()] [int(l) for l in input().split()] L ans = 1 1 ans
N, X = map(int, input().split())
L = [int(l) for l in input().split()]
if sum(L) <= X:
  print(N+1)
  exit()
D = 0
ans = 1
for i in range(N):
  D += L[i]
  if D <= X:
    ans += 1
  else:
    print(ans)
    exit()
