import 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[] l = new int[n];
        int d = 0;
        for(int i = 0 ; i < n ; i++ ){
            l[i] = sc.nextInt();
        }
        boolean in = false;
        int s = 0;
        while(in == false){
            d += l[s];
            if(x < d || s == n - 1){
                in = true;
            }else{
                s++;
            }
        }
        int a = 0;
        for(int i = 0 ; i < n ; i++ ){
            a += l[i];
        }
        if(x >= a){
            s++;
        }
        s++;
        System.out.println(s);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int x = sc.nextInt();
        int[] l = new int[n];
        int d = 0;
        for(int i = 0 ; i < n ; i++ ){
            l[i] = sc.nextInt();
        }
        boolean in = false;
        int s = 0;
        while(in == false){
            d += l[s];
            if(x < d || s == n - 1){
                in = true;
            }else{
                s++;
            }
        }
        int a = 0;
        for(int i = 0 ; i < n ; i++ ){
            a += l[i];
        }
        if(x >= a){
            s++;
        }
        s++;
        System.out.println(s);
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int x = sc.nextInt();
        int[] l = new int[n];
        int d = 0;
        for(int i = 0 ; i < n ; i++ ){
            l[i] = sc.nextInt();
        }
        boolean in = false;
        int s = 0;
        while(in == false){
            d += l[s];
            if(x < d || s == n - 1){
                in = true;
            }else{
                s++;
            }
        }
        int a = 0;
        for(int i = 0 ; i < n ; i++ ){
            a += l[i];
        }
        if(x >= a){
            s++;
        }
        s++;
        System.out.println(s);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int x = sc.nextInt();
        int[] l = new int[n];
        int d = 0;
        for(int i = 0 ; i < n ; i++ ){
            l[i] = sc.nextInt();
        }
        boolean in = false;
        int s = 0;
        while(in == false){
            d += l[s];
            if(x < d || s == n - 1){
                in = true;
            }else{
                s++;
            }
        }
        int a = 0;
        for(int i = 0 ; i < n ; i++ ){
            a += l[i];
        }
        if(x >= a){
            s++;
        }
        s++;
        System.out.println(s);
    } 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[] l = new int[n]; l new int[n] n int d = 0; d 0 for(int i = 0 ; i < n ; i++ ){
            l[i] = sc.nextInt();
        } int i = 0 ; int i = 0 ; i 0 i < n i n i++ i++ i {
            l[i] = sc.nextInt();
        } {
            l[i] = sc.nextInt();
        } l[i] = sc.nextInt() l[i] l i sc.nextInt() sc.nextInt sc boolean in = false; in false int s = 0; s 0 while(in == false){
            d += l[s];
            if(x < d || s == n - 1){
                in = true;
            }else{
                s++;
            }
        } in == false in false {
            d += l[s];
            if(x < d || s == n - 1){
                in = true;
            }else{
                s++;
            }
        } d += l[s] d l[s] l s if(x < d || s == n - 1){
                in = true;
            }else{
                s++;
            } x < d || s == n - 1 x < d x d s == n - 1 s n - 1 n 1 {
                in = true;
            } in = true in true {
                s++;
            } s++ s int a = 0; a 0 for(int i = 0 ; i < n ; i++ ){
            a += l[i];
        } int i = 0 ; int i = 0 ; i 0 i < n i n i++ i++ i {
            a += l[i];
        } {
            a += l[i];
        } a += l[i] a l[i] l i if(x >= a){
            s++;
        } x >= a x a {
            s++;
        } s++ s s++ s System.out.println(s) System.out.println System.out System System.out s 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[] l = new int[n];
        int d = 0;
        for(int i = 0 ; i < n ; i++ ){
            l[i] = sc.nextInt();
        }
        boolean in = false;
        int s = 0;
        while(in == false){
            d += l[s];
            if(x < d || s == n - 1){
                in = true;
            }else{
                s++;
            }
        }
        int a = 0;
        for(int i = 0 ; i < n ; i++ ){
            a += l[i];
        }
        if(x >= a){
            s++;
        }
        s++;
        System.out.println(s);
    }
} public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int x = sc.nextInt();
        int[] l = new int[n];
        int d = 0;
        for(int i = 0 ; i < n ; i++ ){
            l[i] = sc.nextInt();
        }
        boolean in = false;
        int s = 0;
        while(in == false){
            d += l[s];
            if(x < d || s == n - 1){
                in = true;
            }else{
                s++;
            }
        }
        int a = 0;
        for(int i = 0 ; i < n ; i++ ){
            a += l[i];
        }
        if(x >= a){
            s++;
        }
        s++;
        System.out.println(s);
    }
} Main
import 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[] l = new int[n];
        int d = 0;
        for(int i = 0 ; i < n ; i++ ){
            l[i] = sc.nextInt();
        }
        boolean in = false;
        int s = 0;
        while(in == false){
            d += l[s];
            if(x < d || s == n - 1){
                in = true;
            }else{
                s++;
            }
        }
        int a = 0;
        for(int i = 0 ; i < n ; i++ ){
            a += l[i];
        }
        if(x >= a){
            s++;
        }
        s++;
        System.out.println(s);
    }
}