N,X=map(int,input().split())
List = list(map(int, input().split()))
height = 0
res = 1
def checkF(k,x):
  if k>x:
    return True
  else:
    return False
    
for i in range(N):
  height += List[i]
  res +=1
  if checkF(height,X):
    res = res-1
    break
print(res) N,X=map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split X List = list(map(int, input().split())) List list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split height = 0 height 0 res = 1 res 1 def checkF(k,x):
  if k>x:
    return True
  else:
    return False
     checkF if k>x:
    return True
  else:
    return False
     k>x k x return True True return False False k k x x for i in range(N):
  height += List[i]
  res +=1
  if checkF(height,X):
    res = res-1
    break i range(N) range N height += List[i] height List[i] List i res +=1 res 1 if checkF(height,X):
    res = res-1
    break checkF(height,X) checkF height X res = res-1 res res-1 res 1 break print(res) print res res = 1 1 res def checkF(k,x):
  if k>x:
    return True
  else:
    return False
     def checkF(k,x):
  if k>x:
    return True
  else:
    return False
     checkF res = res-1 res-1 res height += List[i] List[i] height List = list(map(int, input().split())) list(map(int, input().split())) List res +=1 1 res X=map(int,input().split()) map(int,input().split()) X N,X=map(int,input().split()) map(int,input().split()) N height = 0 0 height
N,X=map(int,input().split())
List = list(map(int, input().split()))
height = 0
res = 1
def checkF(k,x):
  if k>x:
    return True
  else:
    return False
    
for i in range(N):
  height += List[i]
  res +=1
  if checkF(height,X):
    res = res-1
    break
print(res)