import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int x = scanner.nextInt();
        int[] l = new int[n];
        int d = 0;
        for(int i = 0; i < n; i++){
            l[i] = scanner.nextInt();
        }

        int i = 0;
        while(d <= x && i < n){
            d = d + l[i];
            i++;
        }
        if(i ==  n && d <= x ) {
            System.out.println(i + 1);
        } else {
            System.out.println(i);
        }

    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int x = scanner.nextInt();
        int[] l = new int[n];
        int d = 0;
        for(int i = 0; i < n; i++){
            l[i] = scanner.nextInt();
        }

        int i = 0;
        while(d <= x && i < n){
            d = d + l[i];
            i++;
        }
        if(i ==  n && d <= x ) {
            System.out.println(i + 1);
        } else {
            System.out.println(i);
        }

    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int x = scanner.nextInt();
        int[] l = new int[n];
        int d = 0;
        for(int i = 0; i < n; i++){
            l[i] = scanner.nextInt();
        }

        int i = 0;
        while(d <= x && i < n){
            d = d + l[i];
            i++;
        }
        if(i ==  n && d <= x ) {
            System.out.println(i + 1);
        } else {
            System.out.println(i);
        }

    } main {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int x = scanner.nextInt();
        int[] l = new int[n];
        int d = 0;
        for(int i = 0; i < n; i++){
            l[i] = scanner.nextInt();
        }

        int i = 0;
        while(d <= x && i < n){
            d = d + l[i];
            i++;
        }
        if(i ==  n && d <= x ) {
            System.out.println(i + 1);
        } else {
            System.out.println(i);
        }

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

        int i = 0;
        while(d <= x && i < n){
            d = d + l[i];
            i++;
        }
        if(i ==  n && d <= x ) {
            System.out.println(i + 1);
        } else {
            System.out.println(i);
        }

    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int x = scanner.nextInt();
        int[] l = new int[n];
        int d = 0;
        for(int i = 0; i < n; i++){
            l[i] = scanner.nextInt();
        }

        int i = 0;
        while(d <= x && i < n){
            d = d + l[i];
            i++;
        }
        if(i ==  n && d <= x ) {
            System.out.println(i + 1);
        } else {
            System.out.println(i);
        }

    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int x = scanner.nextInt();
        int[] l = new int[n];
        int d = 0;
        for(int i = 0; i < n; i++){
            l[i] = scanner.nextInt();
        }

        int i = 0;
        while(d <= x && i < n){
            d = d + l[i];
            i++;
        }
        if(i ==  n && d <= x ) {
            System.out.println(i + 1);
        } else {
            System.out.println(i);
        }

    }
}
