import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

            Scanner scanner = new Scanner(System.in);
            String input = scanner.nextLine();
            String[] inputs = input.split(" ");

            int n = Integer.parseInt(inputs[0]);
            int x = Integer.parseInt(inputs[1]);

            String lineStr = scanner.nextLine();
            String[] lines = lineStr.split(" ");
            int[] line = new int[n];

            for (int i = 0;i < n;i++) {
                 
                line[i] = Integer.parseInt(lines[i]);
            }

            int answer = 1;
            int distance = 0;

            for (int i =0;i< n;i++) {

                distance  = distance + line[i];
                
                if (distance > x) {
                    break;
                } 

                answer++;

            }

            System.out.println(answer);
            
            scanner.close();
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {

            Scanner scanner = new Scanner(System.in);
            String input = scanner.nextLine();
            String[] inputs = input.split(" ");

            int n = Integer.parseInt(inputs[0]);
            int x = Integer.parseInt(inputs[1]);

            String lineStr = scanner.nextLine();
            String[] lines = lineStr.split(" ");
            int[] line = new int[n];

            for (int i = 0;i < n;i++) {
                 
                line[i] = Integer.parseInt(lines[i]);
            }

            int answer = 1;
            int distance = 0;

            for (int i =0;i< n;i++) {

                distance  = distance + line[i];
                
                if (distance > x) {
                    break;
                } 

                answer++;

            }

            System.out.println(answer);
            
            scanner.close();
    }
} Main public static void main(String[] args) {

            Scanner scanner = new Scanner(System.in);
            String input = scanner.nextLine();
            String[] inputs = input.split(" ");

            int n = Integer.parseInt(inputs[0]);
            int x = Integer.parseInt(inputs[1]);

            String lineStr = scanner.nextLine();
            String[] lines = lineStr.split(" ");
            int[] line = new int[n];

            for (int i = 0;i < n;i++) {
                 
                line[i] = Integer.parseInt(lines[i]);
            }

            int answer = 1;
            int distance = 0;

            for (int i =0;i< n;i++) {

                distance  = distance + line[i];
                
                if (distance > x) {
                    break;
                } 

                answer++;

            }

            System.out.println(answer);
            
            scanner.close();
    } main {

            Scanner scanner = new Scanner(System.in);
            String input = scanner.nextLine();
            String[] inputs = input.split(" ");

            int n = Integer.parseInt(inputs[0]);
            int x = Integer.parseInt(inputs[1]);

            String lineStr = scanner.nextLine();
            String[] lines = lineStr.split(" ");
            int[] line = new int[n];

            for (int i = 0;i < n;i++) {
                 
                line[i] = Integer.parseInt(lines[i]);
            }

            int answer = 1;
            int distance = 0;

            for (int i =0;i< n;i++) {

                distance  = distance + line[i];
                
                if (distance > x) {
                    break;
                } 

                answer++;

            }

            System.out.println(answer);
            
            scanner.close();
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String input = scanner.nextLine(); input scanner.nextLine() scanner.nextLine scanner String[] inputs = input.split(" "); inputs input.split(" ") input.split input " " int n = Integer.parseInt(inputs[0]); n Integer.parseInt(inputs[0]) Integer.parseInt Integer inputs[0] inputs 0 int x = Integer.parseInt(inputs[1]); x Integer.parseInt(inputs[1]) Integer.parseInt Integer inputs[1] inputs 1 String lineStr = scanner.nextLine(); lineStr scanner.nextLine() scanner.nextLine scanner String[] lines = lineStr.split(" "); lines lineStr.split(" ") lineStr.split lineStr " " int[] line = new int[n]; line new int[n] n for (int i = 0;i < n;i++) {
                 
                line[i] = Integer.parseInt(lines[i]);
            } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
                 
                line[i] = Integer.parseInt(lines[i]);
            } {
                 
                line[i] = Integer.parseInt(lines[i]);
            } line[i] = Integer.parseInt(lines[i]) line[i] line i Integer.parseInt(lines[i]) Integer.parseInt Integer lines[i] lines i int answer = 1; answer 1 int distance = 0; distance 0 for (int i =0;i< n;i++) {

                distance  = distance + line[i];
                
                if (distance > x) {
                    break;
                } 

                answer++;

            } int i =0; int i =0; i 0 i< n i n i++ i++ i {

                distance  = distance + line[i];
                
                if (distance > x) {
                    break;
                } 

                answer++;

            } {

                distance  = distance + line[i];
                
                if (distance > x) {
                    break;
                } 

                answer++;

            } distance  = distance + line[i] distance distance + line[i] distance line[i] line i if (distance > x) {
                    break;
                } distance > x distance x {
                    break;
                } break; answer++ answer System.out.println(answer) System.out.println System.out System System.out answer scanner.close() scanner.close scanner String[] args args public class Main {

    public static void main(String[] args) {

            Scanner scanner = new Scanner(System.in);
            String input = scanner.nextLine();
            String[] inputs = input.split(" ");

            int n = Integer.parseInt(inputs[0]);
            int x = Integer.parseInt(inputs[1]);

            String lineStr = scanner.nextLine();
            String[] lines = lineStr.split(" ");
            int[] line = new int[n];

            for (int i = 0;i < n;i++) {
                 
                line[i] = Integer.parseInt(lines[i]);
            }

            int answer = 1;
            int distance = 0;

            for (int i =0;i< n;i++) {

                distance  = distance + line[i];
                
                if (distance > x) {
                    break;
                } 

                answer++;

            }

            System.out.println(answer);
            
            scanner.close();
    }
} public class Main {

    public static void main(String[] args) {

            Scanner scanner = new Scanner(System.in);
            String input = scanner.nextLine();
            String[] inputs = input.split(" ");

            int n = Integer.parseInt(inputs[0]);
            int x = Integer.parseInt(inputs[1]);

            String lineStr = scanner.nextLine();
            String[] lines = lineStr.split(" ");
            int[] line = new int[n];

            for (int i = 0;i < n;i++) {
                 
                line[i] = Integer.parseInt(lines[i]);
            }

            int answer = 1;
            int distance = 0;

            for (int i =0;i< n;i++) {

                distance  = distance + line[i];
                
                if (distance > x) {
                    break;
                } 

                answer++;

            }

            System.out.println(answer);
            
            scanner.close();
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

            Scanner scanner = new Scanner(System.in);
            String input = scanner.nextLine();
            String[] inputs = input.split(" ");

            int n = Integer.parseInt(inputs[0]);
            int x = Integer.parseInt(inputs[1]);

            String lineStr = scanner.nextLine();
            String[] lines = lineStr.split(" ");
            int[] line = new int[n];

            for (int i = 0;i < n;i++) {
                 
                line[i] = Integer.parseInt(lines[i]);
            }

            int answer = 1;
            int distance = 0;

            for (int i =0;i< n;i++) {

                distance  = distance + line[i];
                
                if (distance > x) {
                    break;
                } 

                answer++;

            }

            System.out.println(answer);
            
            scanner.close();
    }
}