import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        System.out.print("");
        int X = sc.nextInt();
        System.out.println("");

        int[] L = new int[N];
        int i;
        for(i = 0; i < N; i++){
            L[i] = sc.nextInt();
            System.out.print("");
        }
        i = 0;
        int c = 1;
        int sum = 0;

        while(sum <= X && N > 0){
            sum += L[i];
            if(sum <= X) c++;
            i++;
            N --;
        }
        System.out.println(c);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        System.out.print("");
        int X = sc.nextInt();
        System.out.println("");

        int[] L = new int[N];
        int i;
        for(i = 0; i < N; i++){
            L[i] = sc.nextInt();
            System.out.print("");
        }
        i = 0;
        int c = 1;
        int sum = 0;

        while(sum <= X && N > 0){
            sum += L[i];
            if(sum <= X) c++;
            i++;
            N --;
        }
        System.out.println(c);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        System.out.print("");
        int X = sc.nextInt();
        System.out.println("");

        int[] L = new int[N];
        int i;
        for(i = 0; i < N; i++){
            L[i] = sc.nextInt();
            System.out.print("");
        }
        i = 0;
        int c = 1;
        int sum = 0;

        while(sum <= X && N > 0){
            sum += L[i];
            if(sum <= X) c++;
            i++;
            N --;
        }
        System.out.println(c);
    } main {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        System.out.print("");
        int X = sc.nextInt();
        System.out.println("");

        int[] L = new int[N];
        int i;
        for(i = 0; i < N; i++){
            L[i] = sc.nextInt();
            System.out.print("");
        }
        i = 0;
        int c = 1;
        int sum = 0;

        while(sum <= X && N > 0){
            sum += L[i];
            if(sum <= X) c++;
            i++;
            N --;
        }
        System.out.println(c);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc System.out.print("") System.out.print System.out System System.out "" int X = sc.nextInt(); X sc.nextInt() sc.nextInt sc System.out.println("") System.out.println System.out System System.out "" int[] L = new int[N]; L new int[N] N int i; i for(i = 0; i < N; i++){
            L[i] = sc.nextInt();
            System.out.print("");
        } i = 0; i = 0 i 0 i < N i N i++ i++ i {
            L[i] = sc.nextInt();
            System.out.print("");
        } {
            L[i] = sc.nextInt();
            System.out.print("");
        } L[i] = sc.nextInt() L[i] L i sc.nextInt() sc.nextInt sc System.out.print("") System.out.print System.out System System.out "" i = 0 i 0 int c = 1; c 1 int sum = 0; sum 0 while(sum <= X && N > 0){
            sum += L[i];
            if(sum <= X) c++;
            i++;
            N --;
        } sum <= X && N > 0 sum <= X sum X N > 0 N 0 {
            sum += L[i];
            if(sum <= X) c++;
            i++;
            N --;
        } sum += L[i] sum L[i] L i if(sum <= X) c++; sum <= X sum X c++ c i++ i N -- N System.out.println(c) System.out.println System.out System System.out c String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        System.out.print("");
        int X = sc.nextInt();
        System.out.println("");

        int[] L = new int[N];
        int i;
        for(i = 0; i < N; i++){
            L[i] = sc.nextInt();
            System.out.print("");
        }
        i = 0;
        int c = 1;
        int sum = 0;

        while(sum <= X && N > 0){
            sum += L[i];
            if(sum <= X) c++;
            i++;
            N --;
        }
        System.out.println(c);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        System.out.print("");
        int X = sc.nextInt();
        System.out.println("");

        int[] L = new int[N];
        int i;
        for(i = 0; i < N; i++){
            L[i] = sc.nextInt();
            System.out.print("");
        }
        i = 0;
        int c = 1;
        int sum = 0;

        while(sum <= X && N > 0){
            sum += L[i];
            if(sum <= X) c++;
            i++;
            N --;
        }
        System.out.println(c);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        System.out.print("");
        int X = sc.nextInt();
        System.out.println("");

        int[] L = new int[N];
        int i;
        for(i = 0; i < N; i++){
            L[i] = sc.nextInt();
            System.out.print("");
        }
        i = 0;
        int c = 1;
        int sum = 0;

        while(sum <= X && N > 0){
            sum += L[i];
            if(sum <= X) c++;
            i++;
            N --;
        }
        System.out.println(c);
    }
}
