import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner input = new Scanner(System.in);

        int n = input.nextInt();
        int X = input.nextInt();

        int[] L = new int[n];

        for (int i = 0; i < L.length; i++) {
            L[i] = input.nextInt();
        }
        int count = 0;
        for (int j = 0; j < L.length; j++) {
            X -= L[j];
            if (X >= 0) {
                count += 1;
            }
        }

        System.out.println(count+1);
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {

        Scanner input = new Scanner(System.in);

        int n = input.nextInt();
        int X = input.nextInt();

        int[] L = new int[n];

        for (int i = 0; i < L.length; i++) {
            L[i] = input.nextInt();
        }
        int count = 0;
        for (int j = 0; j < L.length; j++) {
            X -= L[j];
            if (X >= 0) {
                count += 1;
            }
        }

        System.out.println(count+1);
    }
} Main public static void main(String[] args) {

        Scanner input = new Scanner(System.in);

        int n = input.nextInt();
        int X = input.nextInt();

        int[] L = new int[n];

        for (int i = 0; i < L.length; i++) {
            L[i] = input.nextInt();
        }
        int count = 0;
        for (int j = 0; j < L.length; j++) {
            X -= L[j];
            if (X >= 0) {
                count += 1;
            }
        }

        System.out.println(count+1);
    } main {

        Scanner input = new Scanner(System.in);

        int n = input.nextInt();
        int X = input.nextInt();

        int[] L = new int[n];

        for (int i = 0; i < L.length; i++) {
            L[i] = input.nextInt();
        }
        int count = 0;
        for (int j = 0; j < L.length; j++) {
            X -= L[j];
            if (X >= 0) {
                count += 1;
            }
        }

        System.out.println(count+1);
    } Scanner input = new Scanner(System.in); input new Scanner(System.in) int n = input.nextInt(); n input.nextInt() input.nextInt input int X = input.nextInt(); X input.nextInt() input.nextInt input int[] L = new int[n]; L new int[n] n for (int i = 0; i < L.length; i++) {
            L[i] = input.nextInt();
        } int i = 0; int i = 0; i 0 i < L.length i L.length L L.length i++ i++ i {
            L[i] = input.nextInt();
        } {
            L[i] = input.nextInt();
        } L[i] = input.nextInt() L[i] L i input.nextInt() input.nextInt input int count = 0; count 0 for (int j = 0; j < L.length; j++) {
            X -= L[j];
            if (X >= 0) {
                count += 1;
            }
        } int j = 0; int j = 0; j 0 j < L.length j L.length L L.length j++ j++ j {
            X -= L[j];
            if (X >= 0) {
                count += 1;
            }
        } {
            X -= L[j];
            if (X >= 0) {
                count += 1;
            }
        } X -= L[j] X L[j] L j if (X >= 0) {
                count += 1;
            } X >= 0 X 0 {
                count += 1;
            } count += 1 count 1 System.out.println(count+1) System.out.println System.out System System.out count+1 count 1 String[] args args public class Main {

    public static void main(String[] args) {

        Scanner input = new Scanner(System.in);

        int n = input.nextInt();
        int X = input.nextInt();

        int[] L = new int[n];

        for (int i = 0; i < L.length; i++) {
            L[i] = input.nextInt();
        }
        int count = 0;
        for (int j = 0; j < L.length; j++) {
            X -= L[j];
            if (X >= 0) {
                count += 1;
            }
        }

        System.out.println(count+1);
    }
} public class Main {

    public static void main(String[] args) {

        Scanner input = new Scanner(System.in);

        int n = input.nextInt();
        int X = input.nextInt();

        int[] L = new int[n];

        for (int i = 0; i < L.length; i++) {
            L[i] = input.nextInt();
        }
        int count = 0;
        for (int j = 0; j < L.length; j++) {
            X -= L[j];
            if (X >= 0) {
                count += 1;
            }
        }

        System.out.println(count+1);
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner input = new Scanner(System.in);

        int n = input.nextInt();
        int X = input.nextInt();

        int[] L = new int[n];

        for (int i = 0; i < L.length; i++) {
            L[i] = input.nextInt();
        }
        int count = 0;
        for (int j = 0; j < L.length; j++) {
            X -= L[j];
            if (X >= 0) {
                count += 1;
            }
        }

        System.out.println(count+1);
    }
}