'use strict'
function main(input) {
    const tmp1 = input.split('\n');
    const tmp2 = tmp1[0].split(' ');
    const N = parseInt(tmp2[0], 10);
    const X = parseInt(tmp2[1], 10);
    const L = tmp1[1].split(' ').map((l) => parseInt(l, 10));

    let D = [0];
    for (let i = 1; i < N; i++) {
        D[i] = D[i - 1] + L[i - 1];
    }
    const DlowerThanX = D.filter((d) => d <= X);
    console.log(DlowerThanX.length);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));