import java.util.Scanner;

public class Main {
    //Bounding
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), x = sc.nextInt();
        int[] L = new int[n];
        for (int i = 0; i < n; i++) L[i] = sc.nextInt();
        int d = 0, index = 1;
        while (d < x && index <= n) {
            d = d + L[index - 1];
            index++;
        }
        if (d <= x) System.out.println(index);
        else System.out.println(index - 1);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    //Bounding
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), x = sc.nextInt();
        int[] L = new int[n];
        for (int i = 0; i < n; i++) L[i] = sc.nextInt();
        int d = 0, index = 1;
        while (d < x && index <= n) {
            d = d + L[index - 1];
            index++;
        }
        if (d <= x) System.out.println(index);
        else System.out.println(index - 1);
    }
} Main //Bounding
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), x = sc.nextInt();
        int[] L = new int[n];
        for (int i = 0; i < n; i++) L[i] = sc.nextInt();
        int d = 0, index = 1;
        while (d < x && index <= n) {
            d = d + L[index - 1];
            index++;
        }
        if (d <= x) System.out.println(index);
        else System.out.println(index - 1);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), x = sc.nextInt();
        int[] L = new int[n];
        for (int i = 0; i < n; i++) L[i] = sc.nextInt();
        int d = 0, index = 1;
        while (d < x && index <= n) {
            d = d + L[index - 1];
            index++;
        }
        if (d <= x) System.out.println(index);
        else System.out.println(index - 1);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt() n sc.nextInt() sc.nextInt sc x = sc.nextInt(); x sc.nextInt() sc.nextInt sc int[] L = new int[n]; L new int[n] n for (int i = 0; i < n; i++) L[i] = sc.nextInt(); int i = 0; int i = 0; i 0 i < n i n i++ i++ i L[i] = sc.nextInt(); L[i] = sc.nextInt() L[i] L i sc.nextInt() sc.nextInt sc int d = 0 d 0 index = 1; index 1 while (d < x && index <= n) {
            d = d + L[index - 1];
            index++;
        } d < x && index <= n d < x d x index <= n index n {
            d = d + L[index - 1];
            index++;
        } d = d + L[index - 1] d d + L[index - 1] d L[index - 1] L index - 1 index 1 index++ index if (d <= x) System.out.println(index);
        else System.out.println(index - 1); d <= x d x System.out.println(index) System.out.println System.out System System.out index System.out.println(index - 1) System.out.println System.out System System.out index - 1 index 1 String[] args args public class Main {
    //Bounding
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), x = sc.nextInt();
        int[] L = new int[n];
        for (int i = 0; i < n; i++) L[i] = sc.nextInt();
        int d = 0, index = 1;
        while (d < x && index <= n) {
            d = d + L[index - 1];
            index++;
        }
        if (d <= x) System.out.println(index);
        else System.out.println(index - 1);
    }
} public class Main {
    //Bounding
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), x = sc.nextInt();
        int[] L = new int[n];
        for (int i = 0; i < n; i++) L[i] = sc.nextInt();
        int d = 0, index = 1;
        while (d < x && index <= n) {
            d = d + L[index - 1];
            index++;
        }
        if (d <= x) System.out.println(index);
        else System.out.println(index - 1);
    }
} Main
import java.util.Scanner;

public class Main {
    //Bounding
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), x = sc.nextInt();
        int[] L = new int[n];
        for (int i = 0; i < n; i++) L[i] = sc.nextInt();
        int d = 0, index = 1;
        while (d < x && index <= n) {
            d = d + L[index - 1];
            index++;
        }
        if (d <= x) System.out.println(index);
        else System.out.println(index - 1);
    }
}
