import java.util.Scanner;

public class Main {

    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int X = sc.nextInt();
        int[] list = new int[N];
        int pos =0; 
        list[0] = 0; 
        for (int i = 0; i < list.length; i++) {
            list[i] = sc.nextInt();
        }
        int c=1;
        for(int i=0; i<list.length; i++) {
            pos += list[i];
            if(pos > X) {
                break;
            } else if( pos == X) {
                c++;
                break;
            }
            c++;
//            System.out.println("pos:"+pos+" ptr: "+ptr);
        }
        System.out.println(c);
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int X = sc.nextInt();
        int[] list = new int[N];
        int pos =0; 
        list[0] = 0; 
        for (int i = 0; i < list.length; i++) {
            list[i] = sc.nextInt();
        }
        int c=1;
        for(int i=0; i<list.length; i++) {
            pos += list[i];
            if(pos > X) {
                break;
            } else if( pos == X) {
                c++;
                break;
            }
            c++;
//            System.out.println("pos:"+pos+" ptr: "+ptr);
        }
        System.out.println(c);
    }
} Main public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int X = sc.nextInt();
        int[] list = new int[N];
        int pos =0; 
        list[0] = 0; 
        for (int i = 0; i < list.length; i++) {
            list[i] = sc.nextInt();
        }
        int c=1;
        for(int i=0; i<list.length; i++) {
            pos += list[i];
            if(pos > X) {
                break;
            } else if( pos == X) {
                c++;
                break;
            }
            c++;
//            System.out.println("pos:"+pos+" ptr: "+ptr);
        }
        System.out.println(c);
    } main {

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int X = sc.nextInt();
        int[] list = new int[N];
        int pos =0; 
        list[0] = 0; 
        for (int i = 0; i < list.length; i++) {
            list[i] = sc.nextInt();
        }
        int c=1;
        for(int i=0; i<list.length; i++) {
            pos += list[i];
            if(pos > X) {
                break;
            } else if( pos == X) {
                c++;
                break;
            }
            c++;
//            System.out.println("pos:"+pos+" ptr: "+ptr);
        }
        System.out.println(c);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int X = sc.nextInt(); X sc.nextInt() sc.nextInt sc int[] list = new int[N]; list new int[N] N int pos =0; pos 0 list[0] = 0 list[0] list 0 0 for (int i = 0; i < list.length; i++) {
            list[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < list.length i list.length list list.length i++ i++ i {
            list[i] = sc.nextInt();
        } {
            list[i] = sc.nextInt();
        } list[i] = sc.nextInt() list[i] list i sc.nextInt() sc.nextInt sc int c=1; c 1 for(int i=0; i<list.length; i++) {
            pos += list[i];
            if(pos > X) {
                break;
            } else if( pos == X) {
                c++;
                break;
            }
            c++;
//            System.out.println("pos:"+pos+" ptr: "+ptr);
        } int i=0; int i=0; i 0 i<list.length i list.length list list.length i++ i++ i {
            pos += list[i];
            if(pos > X) {
                break;
            } else if( pos == X) {
                c++;
                break;
            }
            c++;
//            System.out.println("pos:"+pos+" ptr: "+ptr);
        } {
            pos += list[i];
            if(pos > X) {
                break;
            } else if( pos == X) {
                c++;
                break;
            }
            c++;
//            System.out.println("pos:"+pos+" ptr: "+ptr);
        } pos += list[i] pos list[i] list i if(pos > X) {
                break;
            } else if( pos == X) {
                c++;
                break;
            } pos > X pos X {
                break;
            } break; if( pos == X) {
                c++;
                break;
            } pos == X pos X {
                c++;
                break;
            } c++ c break; c++ c System.out.println(c) System.out.println System.out System System.out c String args[] args public class Main {

    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int X = sc.nextInt();
        int[] list = new int[N];
        int pos =0; 
        list[0] = 0; 
        for (int i = 0; i < list.length; i++) {
            list[i] = sc.nextInt();
        }
        int c=1;
        for(int i=0; i<list.length; i++) {
            pos += list[i];
            if(pos > X) {
                break;
            } else if( pos == X) {
                c++;
                break;
            }
            c++;
//            System.out.println("pos:"+pos+" ptr: "+ptr);
        }
        System.out.println(c);
    }
} public class Main {

    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int X = sc.nextInt();
        int[] list = new int[N];
        int pos =0; 
        list[0] = 0; 
        for (int i = 0; i < list.length; i++) {
            list[i] = sc.nextInt();
        }
        int c=1;
        for(int i=0; i<list.length; i++) {
            pos += list[i];
            if(pos > X) {
                break;
            } else if( pos == X) {
                c++;
                break;
            }
            c++;
//            System.out.println("pos:"+pos+" ptr: "+ptr);
        }
        System.out.println(c);
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int X = sc.nextInt();
        int[] list = new int[N];
        int pos =0; 
        list[0] = 0; 
        for (int i = 0; i < list.length; i++) {
            list[i] = sc.nextInt();
        }
        int c=1;
        for(int i=0; i<list.length; i++) {
            pos += list[i];
            if(pos > X) {
                break;
            } else if( pos == X) {
                c++;
                break;
            }
            c++;
//            System.out.println("pos:"+pos+" ptr: "+ptr);
        }
        System.out.println(c);
    }
}