input = require('fs').readFileSync('/dev/stdin', 'utf8')
lines = input.split('\n')
line = lines.shift().split(' ')
N = line[0]
X = line[1]
line = lines.shift().split(' ')
ans = 1
sum = 0
for (i = 0; i<N; i++) {
    sum += line[i] * 1
    if (sum <= X) {
        ans++
    }
}
console.log(ans)