n,x = map(int,input().split())
l = list(map(int,input().split()))
dist = [0]*(n+1)
for i in range(1,n+1):
    dist[i] = dist[i-1] + l[i-1]
    
cnt = 0
for i in range(n+1):
    if dist[i]<= x:
        cnt += 1
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 dist = [0]*(n+1) dist [0]*(n+1) [0] 0 n+1 n 1 for i in range(1,n+1):
    dist[i] = dist[i-1] + l[i-1]
     i range(1,n+1) range 1 n+1 n 1 dist[i] = dist[i-1] + l[i-1] dist[i] dist i dist[i-1] + l[i-1] dist[i-1] dist i-1 i 1 l[i-1] l i-1 i 1 cnt = 0 cnt 0 for i in range(n+1):
    if dist[i]<= x:
        cnt += 1 i range(n+1) range n+1 n 1 if dist[i]<= x:
        cnt += 1 dist[i]<= x dist[i] dist i x cnt += 1 cnt 1 print(cnt) print cnt dist = [0]*(n+1) [0]*(n+1) dist l = list(map(int,input().split())) list(map(int,input().split())) l cnt = 0 0 cnt n,x = map(int,input().split()) map(int,input().split()) n x = map(int,input().split()) map(int,input().split()) x cnt += 1 1 cnt
n,x = map(int,input().split())
l = list(map(int,input().split()))
dist = [0]*(n+1)
for i in range(1,n+1):
    dist[i] = dist[i-1] + l[i-1]
    
cnt = 0
for i in range(n+1):
    if dist[i]<= x:
        cnt += 1
print(cnt) 