N,X = map(int,input().split())
L = list(map(int,input().split()))
L.append(0)
D,i,cnt = 0,0,0
while(D <= X and cnt <= N):
  D = D + L[i]
  cnt +=1
  i += 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 L.append(0) L.append L append 0 D,i,cnt = 0,0,0 D 0 i 0 cnt 0 while(D <= X and cnt <= N):
  D = D + L[i]
  cnt +=1
  i += 1 D <= X and cnt <= N D <= X D X cnt <= N cnt N D = D + L[i] D D + L[i] D L[i] L i cnt +=1 cnt 1 i += 1 i 1 print(cnt) print cnt L = list(map(int,input().split())) list(map(int,input().split())) L D = D + L[i] D + L[i] D i,cnt = 0,0,0 0 i cnt = 0,0,0 0 cnt cnt +=1 1 cnt X = map(int,input().split()) map(int,input().split()) X i += 1 1 i N,X = map(int,input().split()) map(int,input().split()) N D,i,cnt = 0,0,0 0 D
N,X = map(int,input().split())
L = list(map(int,input().split()))
L.append(0)
D,i,cnt = 0,0,0
while(D <= X and cnt <= N):
  D = D + L[i]
  cnt +=1
  i += 1
print(cnt)