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

N, X = map(int, input().split())
L = list(map(int, input().split()))
cnt = 1
total = 0
for i in range(N):
  total += L[i]
  if total <= X:
    cnt += 1
  else:
    break
print(cnt)
