'use strict'

function Main(input) {
  const N = Number(input.split("\n")[0].split(" ")[0])
  const X = Number(input.split("\n")[0].split(" ")[1])
  const L = input.split("\n")[1].split(" ").map(x => Number(x))

  let ans = 1
  let now = 0
  for(const l of L) {
    now += l
    if(now > X) {
      break
    }
    ans++
  }
  console.log(ans)  
}

Main(require("fs").readFileSync("/dev/stdin", "utf8").trim())