import bisect
n, x = map(int, input().split())
L = list(map(int, input().split()))
D = [0]
ans = 1
for i in range(1, n+1):
  d = D[i-1] + L[i-1]
  D.append(d)
  if d <= x:
    ans += 1
  else:
    break
print(ans) import bisect bisect 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 D = [0] D [0] 0 ans = 1 ans 1 for i in range(1, n+1):
  d = D[i-1] + L[i-1]
  D.append(d)
  if d <= x:
    ans += 1
  else:
    break i range(1, n+1) range 1 n+1 n 1 d = D[i-1] + L[i-1] d D[i-1] + L[i-1] D[i-1] D i-1 i 1 L[i-1] L i-1 i 1 D.append(d) D.append D append d if d <= x:
    ans += 1
  else:
    break d <= x d x ans += 1 ans 1 break print(ans) print ans d = D[i-1] + L[i-1] D[i-1] + L[i-1] d D = [0] [0] D ans = 1 1 ans L = list(map(int, input().split())) list(map(int, input().split())) L ans += 1 1 ans n, x = map(int, input().split()) map(int, input().split()) n x = map(int, input().split()) map(int, input().split()) x
import bisect
n, x = map(int, input().split())
L = list(map(int, input().split()))
D = [0]
ans = 1
for i in range(1, n+1):
  d = D[i-1] + L[i-1]
  D.append(d)
  if d <= x:
    ans += 1
  else:
    break
print(ans)