log = console.log;
var stdin = require("fs").readFileSync("/dev/stdin", "UTF-8");
var lines = stdin.split("\n");
var N = lines[0].split(" ").map(Number)[0];
var X = lines[0].split(" ").map(Number)[1];
var Points = lines
  .slice(1)
  .filter(v => v !== "")
  .map(v => v.split(" ").map(Number));

Points = Points[0];

var D = 0;
var count = 0;
Points.forEach((v, i) => {
  D += v;
  if (D > X && count === 0) count = i+1;
});
log(count)