import java.io.PrintWriter;
import java.util.Scanner;

public class Main {
    static private Scanner scan = new Scanner(System.in);
    public static void main(String args[]) {
        int int1 = Integer.parseInt(scan.next());
        int int2 = Integer.parseInt(scan.next());
//        int int3 = Integer.parseInt(scan.next());
        int ans_int = 0;
        String ans = "";
        int[] balls = new int [int1];
//        String temp_str1 = "";
//        String temp_str2 = "";
        int temp_int1 = 0;

        for(int i = 0;i<int1;i++){
            balls[i] =  Integer.parseInt(scan.next());
        }
        ans_int+=1;
        for(int i = 0;i<balls.length;i++){
            temp_int1 += balls[i];
            if(temp_int1 > int2){
                break;
            }else{
                ans_int+=1;
            }
        }
        PrintWriter out = new PrintWriter(System.out);
        out.println(ans_int);
        out.flush();
        scan.close();
    }
} import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util public class Main {
    static private Scanner scan = new Scanner(System.in);
    public static void main(String args[]) {
        int int1 = Integer.parseInt(scan.next());
        int int2 = Integer.parseInt(scan.next());
//        int int3 = Integer.parseInt(scan.next());
        int ans_int = 0;
        String ans = "";
        int[] balls = new int [int1];
//        String temp_str1 = "";
//        String temp_str2 = "";
        int temp_int1 = 0;

        for(int i = 0;i<int1;i++){
            balls[i] =  Integer.parseInt(scan.next());
        }
        ans_int+=1;
        for(int i = 0;i<balls.length;i++){
            temp_int1 += balls[i];
            if(temp_int1 > int2){
                break;
            }else{
                ans_int+=1;
            }
        }
        PrintWriter out = new PrintWriter(System.out);
        out.println(ans_int);
        out.flush();
        scan.close();
    }
} Main static private Scanner scan = new Scanner(System.in); scan new Scanner(System.in) public static void main(String args[]) {
        int int1 = Integer.parseInt(scan.next());
        int int2 = Integer.parseInt(scan.next());
//        int int3 = Integer.parseInt(scan.next());
        int ans_int = 0;
        String ans = "";
        int[] balls = new int [int1];
//        String temp_str1 = "";
//        String temp_str2 = "";
        int temp_int1 = 0;

        for(int i = 0;i<int1;i++){
            balls[i] =  Integer.parseInt(scan.next());
        }
        ans_int+=1;
        for(int i = 0;i<balls.length;i++){
            temp_int1 += balls[i];
            if(temp_int1 > int2){
                break;
            }else{
                ans_int+=1;
            }
        }
        PrintWriter out = new PrintWriter(System.out);
        out.println(ans_int);
        out.flush();
        scan.close();
    } main {
        int int1 = Integer.parseInt(scan.next());
        int int2 = Integer.parseInt(scan.next());
//        int int3 = Integer.parseInt(scan.next());
        int ans_int = 0;
        String ans = "";
        int[] balls = new int [int1];
//        String temp_str1 = "";
//        String temp_str2 = "";
        int temp_int1 = 0;

        for(int i = 0;i<int1;i++){
            balls[i] =  Integer.parseInt(scan.next());
        }
        ans_int+=1;
        for(int i = 0;i<balls.length;i++){
            temp_int1 += balls[i];
            if(temp_int1 > int2){
                break;
            }else{
                ans_int+=1;
            }
        }
        PrintWriter out = new PrintWriter(System.out);
        out.println(ans_int);
        out.flush();
        scan.close();
    } int int1 = Integer.parseInt(scan.next()); int1 Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan int int2 = Integer.parseInt(scan.next()); int2 Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan int ans_int = 0; ans_int 0 String ans = ""; ans "" int[] balls = new int [int1]; balls new int [int1] int1 int temp_int1 = 0; temp_int1 0 for(int i = 0;i<int1;i++){
            balls[i] =  Integer.parseInt(scan.next());
        } int i = 0; int i = 0; i 0 i<int1 i int1 i++ i++ i {
            balls[i] =  Integer.parseInt(scan.next());
        } {
            balls[i] =  Integer.parseInt(scan.next());
        } balls[i] =  Integer.parseInt(scan.next()) balls[i] balls i Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan ans_int+=1 ans_int 1 for(int i = 0;i<balls.length;i++){
            temp_int1 += balls[i];
            if(temp_int1 > int2){
                break;
            }else{
                ans_int+=1;
            }
        } int i = 0; int i = 0; i 0 i<balls.length i balls.length balls balls.length i++ i++ i {
            temp_int1 += balls[i];
            if(temp_int1 > int2){
                break;
            }else{
                ans_int+=1;
            }
        } {
            temp_int1 += balls[i];
            if(temp_int1 > int2){
                break;
            }else{
                ans_int+=1;
            }
        } temp_int1 += balls[i] temp_int1 balls[i] balls i if(temp_int1 > int2){
                break;
            }else{
                ans_int+=1;
            } temp_int1 > int2 temp_int1 int2 {
                break;
            } break; {
                ans_int+=1;
            } ans_int+=1 ans_int 1 PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) out.println(ans_int) out.println out ans_int out.flush() out.flush out scan.close() scan.close scan String args[] args public class Main {
    static private Scanner scan = new Scanner(System.in);
    public static void main(String args[]) {
        int int1 = Integer.parseInt(scan.next());
        int int2 = Integer.parseInt(scan.next());
//        int int3 = Integer.parseInt(scan.next());
        int ans_int = 0;
        String ans = "";
        int[] balls = new int [int1];
//        String temp_str1 = "";
//        String temp_str2 = "";
        int temp_int1 = 0;

        for(int i = 0;i<int1;i++){
            balls[i] =  Integer.parseInt(scan.next());
        }
        ans_int+=1;
        for(int i = 0;i<balls.length;i++){
            temp_int1 += balls[i];
            if(temp_int1 > int2){
                break;
            }else{
                ans_int+=1;
            }
        }
        PrintWriter out = new PrintWriter(System.out);
        out.println(ans_int);
        out.flush();
        scan.close();
    }
} public class Main {
    static private Scanner scan = new Scanner(System.in);
    public static void main(String args[]) {
        int int1 = Integer.parseInt(scan.next());
        int int2 = Integer.parseInt(scan.next());
//        int int3 = Integer.parseInt(scan.next());
        int ans_int = 0;
        String ans = "";
        int[] balls = new int [int1];
//        String temp_str1 = "";
//        String temp_str2 = "";
        int temp_int1 = 0;

        for(int i = 0;i<int1;i++){
            balls[i] =  Integer.parseInt(scan.next());
        }
        ans_int+=1;
        for(int i = 0;i<balls.length;i++){
            temp_int1 += balls[i];
            if(temp_int1 > int2){
                break;
            }else{
                ans_int+=1;
            }
        }
        PrintWriter out = new PrintWriter(System.out);
        out.println(ans_int);
        out.flush();
        scan.close();
    }
} Main
import java.io.PrintWriter;
import java.util.Scanner;

public class Main {
    static private Scanner scan = new Scanner(System.in);
    public static void main(String args[]) {
        int int1 = Integer.parseInt(scan.next());
        int int2 = Integer.parseInt(scan.next());
//        int int3 = Integer.parseInt(scan.next());
        int ans_int = 0;
        String ans = "";
        int[] balls = new int [int1];
//        String temp_str1 = "";
//        String temp_str2 = "";
        int temp_int1 = 0;

        for(int i = 0;i<int1;i++){
            balls[i] =  Integer.parseInt(scan.next());
        }
        ans_int+=1;
        for(int i = 0;i<balls.length;i++){
            temp_int1 += balls[i];
            if(temp_int1 > int2){
                break;
            }else{
                ans_int+=1;
            }
        }
        PrintWriter out = new PrintWriter(System.out);
        out.println(ans_int);
        out.flush();
        scan.close();
    }
}