const main = (X,L) => {
    var count = 0
    L.reduce((acc,current) => {
        if (X >= acc+current) {
            count++
        }
        return acc+current
    },0)
    return count+1
}

const input = require('fs').readFileSync('/dev/stdin','utf8').split("\n")
const NX = input[0].split(" ").map(i => Number(i))
const N = NX[0]
const X = NX[1]
const L = input[1].split(" ").map(i => Number(i))
console.log(main(X,L))