import java.util.Scanner;

public class Main{

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

        // input
        int num = scan.nextInt();
        int zone = scan.nextInt();
        int pos = 0;
        int count = 1;
        for(int i = 0; i < num; i++){
            pos += scan.nextInt();
            if(pos <= zone){
                count++;
            }
        }

        // answer
        System.out.println(count);

    }
} import java.util.Scanner; Scanner java.util public class Main{

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

        // input
        int num = scan.nextInt();
        int zone = scan.nextInt();
        int pos = 0;
        int count = 1;
        for(int i = 0; i < num; i++){
            pos += scan.nextInt();
            if(pos <= zone){
                count++;
            }
        }

        // answer
        System.out.println(count);

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

        // input
        int num = scan.nextInt();
        int zone = scan.nextInt();
        int pos = 0;
        int count = 1;
        for(int i = 0; i < num; i++){
            pos += scan.nextInt();
            if(pos <= zone){
                count++;
            }
        }

        // answer
        System.out.println(count);

    } main {
        Scanner scan = new Scanner(System.in);

        // input
        int num = scan.nextInt();
        int zone = scan.nextInt();
        int pos = 0;
        int count = 1;
        for(int i = 0; i < num; i++){
            pos += scan.nextInt();
            if(pos <= zone){
                count++;
            }
        }

        // answer
        System.out.println(count);

    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int num = scan.nextInt(); num scan.nextInt() scan.nextInt scan int zone = scan.nextInt(); zone scan.nextInt() scan.nextInt scan int pos = 0; pos 0 int count = 1; count 1 for(int i = 0; i < num; i++){
            pos += scan.nextInt();
            if(pos <= zone){
                count++;
            }
        } int i = 0; int i = 0; i 0 i < num i num i++ i++ i {
            pos += scan.nextInt();
            if(pos <= zone){
                count++;
            }
        } {
            pos += scan.nextInt();
            if(pos <= zone){
                count++;
            }
        } pos += scan.nextInt() pos scan.nextInt() scan.nextInt scan if(pos <= zone){
                count++;
            } pos <= zone pos zone {
                count++;
            } count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main{

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

        // input
        int num = scan.nextInt();
        int zone = scan.nextInt();
        int pos = 0;
        int count = 1;
        for(int i = 0; i < num; i++){
            pos += scan.nextInt();
            if(pos <= zone){
                count++;
            }
        }

        // answer
        System.out.println(count);

    }
} public class Main{

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

        // input
        int num = scan.nextInt();
        int zone = scan.nextInt();
        int pos = 0;
        int count = 1;
        for(int i = 0; i < num; i++){
            pos += scan.nextInt();
            if(pos <= zone){
                count++;
            }
        }

        // answer
        System.out.println(count);

    }
} Main
import java.util.Scanner;

public class Main{

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

        // input
        int num = scan.nextInt();
        int zone = scan.nextInt();
        int pos = 0;
        int count = 1;
        for(int i = 0; i < num; i++){
            pos += scan.nextInt();
            if(pos <= zone){
                count++;
            }
        }

        // answer
        System.out.println(count);

    }
}