// inputに入力データ全体が入る
function Main(input) {
	// 1行目がinput[0], 2行目がinput[1], …に入る
    input = input.split("\n");
    // 数値の配列を作る
    const numList0 = input[0].split(' ').map(x => parseInt(x, 10));
    const lList = input[1].split(' ').map(x => parseInt(x, 10));
    const N = numList0[0];
    const X = numList0[1];

    var currentX = 0;
    var count = 0;
    if (currentX <= X) {
        count++;
    }

    for (var i = 0; i < N; i++) {
        currentX += lList[i];
        if (currentX <= X) {
            count++;
        }
    }

    console.log(count);
}
 
Main(require("fs").readFileSync("/dev/stdin", "utf8"));