# coding: utf-8

from functools import reduce

def solve(X, Ls):
  return len(list(filter(
    lambda x: x <= X, reduce(lambda x, y: x + [x[-1] + y], Ls, [0]))))


if __name__ == '__main__':
  _, X = map(int, input().split())
  print(solve(X, map(int, input().split()))) from functools import reduce def solve(X, Ls):
  return len(list(filter(
    lambda x: x <= X, reduce(lambda x, y: x + [x[-1] + y], Ls, [0])))) solve return len(list(filter(
    lambda x: x <= X, reduce(lambda x, y: x + [x[-1] + y], Ls, [0])))) len(list(filter(
    lambda x: x <= X, reduce(lambda x, y: x + [x[-1] + y], Ls, [0])))) len list(filter(
    lambda x: x <= X, reduce(lambda x, y: x + [x[-1] + y], Ls, [0]))) list filter(
    lambda x: x <= X, reduce(lambda x, y: x + [x[-1] + y], Ls, [0])) filter lambda x: x <= X x <= X x X x reduce(lambda x, y: x + [x[-1] + y], Ls, [0]) reduce lambda x, y: x + [x[-1] + y] x + [x[-1] + y] x [x[-1] + y] x[-1] + y x[-1] x -1 y x y Ls [0] 0 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):
  return len(list(filter(
    lambda x: x <= X, reduce(lambda x, y: x + [x[-1] + y], Ls, [0])))) def solve(X, Ls):
  return len(list(filter(
    lambda x: x <= X, reduce(lambda x, y: x + [x[-1] + y], Ls, [0])))) solve
# coding: utf-8

from functools import reduce

def solve(X, Ls):
  return len(list(filter(
    lambda x: x <= X, reduce(lambda x, y: x + [x[-1] + y], Ls, [0]))))


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