# coding: utf-8

def solve(X, Ls):
  c, s = 0, 0
  for L in Ls:
    s += L
    if s > X:
      break
    c += 1
  return c + 1


if __name__ == '__main__':
  _, X = map(int, input().split())
  print(solve(X, map(int, input().split()))) def solve(X, Ls):
  c, s = 0, 0
  for L in Ls:
    s += L
    if s > X:
      break
    c += 1
  return c + 1 solve c, s = 0, 0 c 0 s 0 for L in Ls:
    s += L
    if s > X:
      break
    c += 1
   L Ls s += L s L if s > X:
      break
     s > X s X break c += 1 c 1 return c + 1 c + 1 c 1 X X Ls Ls if __name__ == '__main__':
  _, X = map(int, input().split())
  print(solve(X, map(int, input().split()))) __name__ == '__main__' __name__ '__main__' _, X = map(int, input().split()) _ map(int, input().split()) map int input().split() ().split () input split X print(solve(X, map(int, input().split()))) print solve(X, map(int, input().split())) solve X map(int, input().split()) map int input().split() ().split () input split _, X = map(int, input().split()) map(int, input().split()) _ X = map(int, input().split()) map(int, input().split()) X def solve(X, Ls):
  c, s = 0, 0
  for L in Ls:
    s += L
    if s > X:
      break
    c += 1
  return c + 1 def solve(X, Ls):
  c, s = 0, 0
  for L in Ls:
    s += L
    if s > X:
      break
    c += 1
  return c + 1 solve
# coding: utf-8

def solve(X, Ls):
  c, s = 0, 0
  for L in Ls:
    s += L
    if s > X:
      break
    c += 1
  return c + 1


if __name__ == '__main__':
  _, X = map(int, input().split())
  print(solve(X, map(int, input().split())))