n,x = map(int, input().split())
L = list(map(int, input().split()))

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

H = 0
count = 0
for i in range(n):
  if H > x:
    print(count)
    exit()
  else:
    H += L[i]
    count += 1
  
if H > x:
  print(n)
else:
  print(n+1)