'use strict'
// Di=Di−1+Li−1

function main(input) {
  input = input
    .trim()
    .split('\n')
    .map(v => v.split(' ').map(v => Number(v)))
  const N = input[0][0]
  const X = input[0][1]
  const L = input[1]
  let pos = 0
  let count = 0
  for (let i = 0; i <= N; i++) {
    if (pos > X) {
      console.log(count)
      return
    }
    pos += L[i]
    count++
  }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'))
