N,X=map(int,input().split())
if N!=1:
  L=list(map(int,input().split()))
  tot=0
  count=1
  for i in range(N):
    tot+=L[i]
    if X>=tot:
      count+=1
  print(count)
else:
  L=int(input())
  if X>=L:
    print(2)
  else:
    print(1) N,X=map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split X if N!=1:
  L=list(map(int,input().split()))
  tot=0
  count=1
  for i in range(N):
    tot+=L[i]
    if X>=tot:
      count+=1
  print(count)
else:
  L=int(input())
  if X>=L:
    print(2)
  else:
    print(1) N!=1 N 1 L=list(map(int,input().split())) L list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split tot=0 tot 0 count=1 count 1 for i in range(N):
    tot+=L[i]
    if X>=tot:
      count+=1
   i range(N) range N tot+=L[i] tot L[i] L i if X>=tot:
      count+=1
   X>=tot X tot count+=1 count 1 print(count) print count L=int(input()) L int(input()) int input() input if X>=L:
    print(2)
  else:
    print(1) X>=L X L print(2) print 2 print(1) print 1 X=map(int,input().split()) map(int,input().split()) X tot+=L[i] L[i] tot count=1 1 count L=int(input()) int(input()) L N,X=map(int,input().split()) map(int,input().split()) N count+=1 1 count L=list(map(int,input().split())) list(map(int,input().split())) L tot=0 0 tot
N,X=map(int,input().split())
if N!=1:
  L=list(map(int,input().split()))
  tot=0
  count=1
  for i in range(N):
    tot+=L[i]
    if X>=tot:
      count+=1
  print(count)
else:
  L=int(input())
  if X>=L:
    print(2)
  else:
    print(1)