import java.util.*;
import java.io.*;

public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line1 = br.readLine();
        String[] params = line1.split(" ");
        int N = Integer.parseInt(params[0]);
        int X = Integer.parseInt(params[1]);
        int sum = 0;
        int count = 1;
        String[] L = br.readLine().split(" ");
        for(String l : L) {
            sum += Integer.parseInt(l);
            count = sum <= X ? ++count : count;
        }
        System.out.println(count);
    }
} import java.util.*; util.* java import java.io.*; io.* java public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line1 = br.readLine();
        String[] params = line1.split(" ");
        int N = Integer.parseInt(params[0]);
        int X = Integer.parseInt(params[1]);
        int sum = 0;
        int count = 1;
        String[] L = br.readLine().split(" ");
        for(String l : L) {
            sum += Integer.parseInt(l);
            count = sum <= X ? ++count : count;
        }
        System.out.println(count);
    }
} Main public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line1 = br.readLine();
        String[] params = line1.split(" ");
        int N = Integer.parseInt(params[0]);
        int X = Integer.parseInt(params[1]);
        int sum = 0;
        int count = 1;
        String[] L = br.readLine().split(" ");
        for(String l : L) {
            sum += Integer.parseInt(l);
            count = sum <= X ? ++count : count;
        }
        System.out.println(count);
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line1 = br.readLine();
        String[] params = line1.split(" ");
        int N = Integer.parseInt(params[0]);
        int X = Integer.parseInt(params[1]);
        int sum = 0;
        int count = 1;
        String[] L = br.readLine().split(" ");
        for(String l : L) {
            sum += Integer.parseInt(l);
            count = sum <= X ? ++count : count;
        }
        System.out.println(count);
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String line1 = br.readLine(); line1 br.readLine() br.readLine br String[] params = line1.split(" "); params line1.split(" ") line1.split line1 " " int N = Integer.parseInt(params[0]); N Integer.parseInt(params[0]) Integer.parseInt Integer params[0] params 0 int X = Integer.parseInt(params[1]); X Integer.parseInt(params[1]) Integer.parseInt Integer params[1] params 1 int sum = 0; sum 0 int count = 1; count 1 String[] L = br.readLine().split(" "); L br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for(String l : L) {
            sum += Integer.parseInt(l);
            count = sum <= X ? ++count : count;
        } String l L {
            sum += Integer.parseInt(l);
            count = sum <= X ? ++count : count;
        } {
            sum += Integer.parseInt(l);
            count = sum <= X ? ++count : count;
        } sum += Integer.parseInt(l) sum Integer.parseInt(l) Integer.parseInt Integer l count = sum <= X ? ++count : count count sum <= X ? ++count : count sum <= X sum X ++count count count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line1 = br.readLine();
        String[] params = line1.split(" ");
        int N = Integer.parseInt(params[0]);
        int X = Integer.parseInt(params[1]);
        int sum = 0;
        int count = 1;
        String[] L = br.readLine().split(" ");
        for(String l : L) {
            sum += Integer.parseInt(l);
            count = sum <= X ? ++count : count;
        }
        System.out.println(count);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line1 = br.readLine();
        String[] params = line1.split(" ");
        int N = Integer.parseInt(params[0]);
        int X = Integer.parseInt(params[1]);
        int sum = 0;
        int count = 1;
        String[] L = br.readLine().split(" ");
        for(String l : L) {
            sum += Integer.parseInt(l);
            count = sum <= X ? ++count : count;
        }
        System.out.println(count);
    }
} Main
import java.util.*;
import java.io.*;

public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line1 = br.readLine();
        String[] params = line1.split(" ");
        int N = Integer.parseInt(params[0]);
        int X = Integer.parseInt(params[1]);
        int sum = 0;
        int count = 1;
        String[] L = br.readLine().split(" ");
        for(String l : L) {
            sum += Integer.parseInt(l);
            count = sum <= X ? ++count : count;
        }
        System.out.println(count);
    }
}
