import java.io.*;

public class Main{
    public static void main(String args[]) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String line1 = br.readLine();
        String line2 = br.readLine();

        String[] array = line1.split(" ");

        int n = Integer.parseInt(array[0]);
        int x = Integer.parseInt(array[1]);

        array = line2.split(" ");
        int l[]  = new int[n];

        for(int i = 0;i < n;i++){
            l[i] = Integer.parseInt(array[i]);
        }

        int kaisuu = 1;
        int length = 0;
        for(int i = 0;i < n;i++){
            length = length + l[i];
            if(length > x ){
                break;
            }
            kaisuu++;
        }
        System.out.println(kaisuu);
    }
} import java.io.*; io.* java public class Main{
    public static void main(String args[]) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String line1 = br.readLine();
        String line2 = br.readLine();

        String[] array = line1.split(" ");

        int n = Integer.parseInt(array[0]);
        int x = Integer.parseInt(array[1]);

        array = line2.split(" ");
        int l[]  = new int[n];

        for(int i = 0;i < n;i++){
            l[i] = Integer.parseInt(array[i]);
        }

        int kaisuu = 1;
        int length = 0;
        for(int i = 0;i < n;i++){
            length = length + l[i];
            if(length > x ){
                break;
            }
            kaisuu++;
        }
        System.out.println(kaisuu);
    }
} Main public static void main(String args[]) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String line1 = br.readLine();
        String line2 = br.readLine();

        String[] array = line1.split(" ");

        int n = Integer.parseInt(array[0]);
        int x = Integer.parseInt(array[1]);

        array = line2.split(" ");
        int l[]  = new int[n];

        for(int i = 0;i < n;i++){
            l[i] = Integer.parseInt(array[i]);
        }

        int kaisuu = 1;
        int length = 0;
        for(int i = 0;i < n;i++){
            length = length + l[i];
            if(length > x ){
                break;
            }
            kaisuu++;
        }
        System.out.println(kaisuu);
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String line1 = br.readLine();
        String line2 = br.readLine();

        String[] array = line1.split(" ");

        int n = Integer.parseInt(array[0]);
        int x = Integer.parseInt(array[1]);

        array = line2.split(" ");
        int l[]  = new int[n];

        for(int i = 0;i < n;i++){
            l[i] = Integer.parseInt(array[i]);
        }

        int kaisuu = 1;
        int length = 0;
        for(int i = 0;i < n;i++){
            length = length + l[i];
            if(length > x ){
                break;
            }
            kaisuu++;
        }
        System.out.println(kaisuu);
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String line1 = br.readLine(); line1 br.readLine() br.readLine br String line2 = br.readLine(); line2 br.readLine() br.readLine br String[] array = line1.split(" "); array line1.split(" ") line1.split line1 " " int n = Integer.parseInt(array[0]); n Integer.parseInt(array[0]) Integer.parseInt Integer array[0] array 0 int x = Integer.parseInt(array[1]); x Integer.parseInt(array[1]) Integer.parseInt Integer array[1] array 1 array = line2.split(" ") array line2.split(" ") line2.split line2 " " int l[]  = new int[n]; l new int[n] n for(int i = 0;i < n;i++){
            l[i] = Integer.parseInt(array[i]);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            l[i] = Integer.parseInt(array[i]);
        } {
            l[i] = Integer.parseInt(array[i]);
        } l[i] = Integer.parseInt(array[i]) l[i] l i Integer.parseInt(array[i]) Integer.parseInt Integer array[i] array i int kaisuu = 1; kaisuu 1 int length = 0; length 0 for(int i = 0;i < n;i++){
            length = length + l[i];
            if(length > x ){
                break;
            }
            kaisuu++;
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            length = length + l[i];
            if(length > x ){
                break;
            }
            kaisuu++;
        } {
            length = length + l[i];
            if(length > x ){
                break;
            }
            kaisuu++;
        } length = length + l[i] length length + l[i] length l[i] l i if(length > x ){
                break;
            } length > x length x {
                break;
            } break; kaisuu++ kaisuu System.out.println(kaisuu) System.out.println System.out System System.out kaisuu String args[] args public class Main{
    public static void main(String args[]) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String line1 = br.readLine();
        String line2 = br.readLine();

        String[] array = line1.split(" ");

        int n = Integer.parseInt(array[0]);
        int x = Integer.parseInt(array[1]);

        array = line2.split(" ");
        int l[]  = new int[n];

        for(int i = 0;i < n;i++){
            l[i] = Integer.parseInt(array[i]);
        }

        int kaisuu = 1;
        int length = 0;
        for(int i = 0;i < n;i++){
            length = length + l[i];
            if(length > x ){
                break;
            }
            kaisuu++;
        }
        System.out.println(kaisuu);
    }
} public class Main{
    public static void main(String args[]) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String line1 = br.readLine();
        String line2 = br.readLine();

        String[] array = line1.split(" ");

        int n = Integer.parseInt(array[0]);
        int x = Integer.parseInt(array[1]);

        array = line2.split(" ");
        int l[]  = new int[n];

        for(int i = 0;i < n;i++){
            l[i] = Integer.parseInt(array[i]);
        }

        int kaisuu = 1;
        int length = 0;
        for(int i = 0;i < n;i++){
            length = length + l[i];
            if(length > x ){
                break;
            }
            kaisuu++;
        }
        System.out.println(kaisuu);
    }
} Main
import java.io.*;

public class Main{
    public static void main(String args[]) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String line1 = br.readLine();
        String line2 = br.readLine();

        String[] array = line1.split(" ");

        int n = Integer.parseInt(array[0]);
        int x = Integer.parseInt(array[1]);

        array = line2.split(" ");
        int l[]  = new int[n];

        for(int i = 0;i < n;i++){
            l[i] = Integer.parseInt(array[i]);
        }

        int kaisuu = 1;
        int length = 0;
        for(int i = 0;i < n;i++){
            length = length + l[i];
            if(length > x ){
                break;
            }
            kaisuu++;
        }
        System.out.println(kaisuu);
    }
}