N, X = map(int, input().split())
L = list(map(int, input().split()))
z = 0
L.insert(0,0)
for i in range(len(L)):
  bound = i+1
  z += L[i]
  if z > X:
    bound -= 1
    break
print(bound) 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 z = 0 z 0 L.insert(0,0) L.insert L insert 0 0 for i in range(len(L)):
  bound = i+1
  z += L[i]
  if z > X:
    bound -= 1
    break i range(len(L)) range len(L) len L bound = i+1 bound i+1 i 1 z += L[i] z L[i] L i if z > X:
    bound -= 1
    break z > X z X bound -= 1 bound 1 break print(bound) print bound bound -= 1 1 bound bound = i+1 i+1 bound N, X = map(int, input().split()) map(int, input().split()) N z = 0 0 z z += L[i] L[i] z L = list(map(int, input().split())) list(map(int, input().split())) L X = map(int, input().split()) map(int, input().split()) X
N, X = map(int, input().split())
L = list(map(int, input().split()))
z = 0
L.insert(0,0)
for i in range(len(L)):
  bound = i+1
  z += L[i]
  if z > X:
    bound -= 1
    break
print(bound)