import java.util.Scanner;

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

        int n = stdIn.nextInt();
        int x = stdIn.nextInt();
        int[] l = new int[n];
        for(int i=0; i<n; i++){
            l[i] = stdIn.nextInt();
        }
        int counter = 1;
        long zahyou = 0;
        for(int i=0; i<n; i++){
            zahyou += l[i];
            if(x<zahyou){
                break;
            }else{
                counter++;
            }
        }
        System.out.println(counter);
    }
} import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String[] args){
        Scanner stdIn = new Scanner(System.in);

        int n = stdIn.nextInt();
        int x = stdIn.nextInt();
        int[] l = new int[n];
        for(int i=0; i<n; i++){
            l[i] = stdIn.nextInt();
        }
        int counter = 1;
        long zahyou = 0;
        for(int i=0; i<n; i++){
            zahyou += l[i];
            if(x<zahyou){
                break;
            }else{
                counter++;
            }
        }
        System.out.println(counter);
    }
} Main public static void main(String[] args){
        Scanner stdIn = new Scanner(System.in);

        int n = stdIn.nextInt();
        int x = stdIn.nextInt();
        int[] l = new int[n];
        for(int i=0; i<n; i++){
            l[i] = stdIn.nextInt();
        }
        int counter = 1;
        long zahyou = 0;
        for(int i=0; i<n; i++){
            zahyou += l[i];
            if(x<zahyou){
                break;
            }else{
                counter++;
            }
        }
        System.out.println(counter);
    } main {
        Scanner stdIn = new Scanner(System.in);

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

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

        int n = stdIn.nextInt();
        int x = stdIn.nextInt();
        int[] l = new int[n];
        for(int i=0; i<n; i++){
            l[i] = stdIn.nextInt();
        }
        int counter = 1;
        long zahyou = 0;
        for(int i=0; i<n; i++){
            zahyou += l[i];
            if(x<zahyou){
                break;
            }else{
                counter++;
            }
        }
        System.out.println(counter);
    }
} Main
import java.util.Scanner;

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

        int n = stdIn.nextInt();
        int x = stdIn.nextInt();
        int[] l = new int[n];
        for(int i=0; i<n; i++){
            l[i] = stdIn.nextInt();
        }
        int counter = 1;
        long zahyou = 0;
        for(int i=0; i<n; i++){
            zahyou += l[i];
            if(x<zahyou){
                break;
            }else{
                counter++;
            }
        }
        System.out.println(counter);
    }
}
