#!/usr/bin/env ruby
# frozen_string_literal: true
n,x = gets.split.map(&:to_i)
l = gets.split.map(&:to_i)
count = 1
d = l[0]
i = 1
while d <= x && i <= n
    count += 1
    d += l[i]
    i += 1
end
puts count