# -*- coding: utf-8 -*-
N, X = [int(n) for n in input().split()]
l = [int(n) for n in input().split()]

D = [0]
for i in range(N):
    D.append(D[-1] + l[i])

#print(D)

count = 0
for n in D:
    if n <= X:
        count += 1
    else:
        break

print(count) int(n) for n in input().split() for n in input().split() n input().split() ().split () input split for n in input().split() int(n) int n N, X = [int(n) for n in input().split()] N [int(n) for n in input().split()] X int(n) for n in input().split() for n in input().split() n input().split() ().split () input split for n in input().split() int(n) int n l = [int(n) for n in input().split()] l [int(n) for n in input().split()] D = [0] D [0] 0 for i in range(N):
    D.append(D[-1] + l[i])

#print(D) i range(N) range N D.append(D[-1] + l[i]) D.append D append D[-1] + l[i] D[-1] D -1 l[i] l i count = 0 count 0 for n in D:
    if n <= X:
        count += 1
    else:
        break n D if n <= X:
        count += 1
    else:
        break n <= X n X count += 1 count 1 break print(count) print count l = [int(n) for n in input().split()] [int(n) for n in input().split()] l X = [int(n) for n in input().split()] [int(n) for n in input().split()] X count = 0 0 count N, X = [int(n) for n in input().split()] [int(n) for n in input().split()] N D = [0] [0] D count += 1 1 count
# -*- coding: utf-8 -*-
N, X = [int(n) for n in input().split()]
l = [int(n) for n in input().split()]

D = [0]
for i in range(N):
    D.append(D[-1] + l[i])

#print(D)

count = 0
for n in D:
    if n <= X:
        count += 1
    else:
        break

print(count)