import java.util.ArrayList;
import java.util.List;
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();
        List<Integer> ins = new ArrayList<>();
        for(int i = 0;i < n;i++){
            ins.add(sc.nextInt());
        }
        int prev = 0;
        int r = 0;
        for(int i = 1;i < n + 1;i++){
            if(prev + ins.get(i - 1) <= x){
                r++;
            }
            prev = prev + ins.get(i - 1);
        }
        System.out.println(++r);
    }
} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util 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();
        List<Integer> ins = new ArrayList<>();
        for(int i = 0;i < n;i++){
            ins.add(sc.nextInt());
        }
        int prev = 0;
        int r = 0;
        for(int i = 1;i < n + 1;i++){
            if(prev + ins.get(i - 1) <= x){
                r++;
            }
            prev = prev + ins.get(i - 1);
        }
        System.out.println(++r);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int x = sc.nextInt();
        List<Integer> ins = new ArrayList<>();
        for(int i = 0;i < n;i++){
            ins.add(sc.nextInt());
        }
        int prev = 0;
        int r = 0;
        for(int i = 1;i < n + 1;i++){
            if(prev + ins.get(i - 1) <= x){
                r++;
            }
            prev = prev + ins.get(i - 1);
        }
        System.out.println(++r);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int x = sc.nextInt();
        List<Integer> ins = new ArrayList<>();
        for(int i = 0;i < n;i++){
            ins.add(sc.nextInt());
        }
        int prev = 0;
        int r = 0;
        for(int i = 1;i < n + 1;i++){
            if(prev + ins.get(i - 1) <= x){
                r++;
            }
            prev = prev + ins.get(i - 1);
        }
        System.out.println(++r);
    } 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 List<Integer> ins = new ArrayList<>(); ins new ArrayList<>() for(int i = 0;i < n;i++){
            ins.add(sc.nextInt());
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            ins.add(sc.nextInt());
        } {
            ins.add(sc.nextInt());
        } ins.add(sc.nextInt()) ins.add ins sc.nextInt() sc.nextInt sc int prev = 0; prev 0 int r = 0; r 0 for(int i = 1;i < n + 1;i++){
            if(prev + ins.get(i - 1) <= x){
                r++;
            }
            prev = prev + ins.get(i - 1);
        } int i = 1; int i = 1; i 1 i < n + 1 i n + 1 n 1 i++ i++ i {
            if(prev + ins.get(i - 1) <= x){
                r++;
            }
            prev = prev + ins.get(i - 1);
        } {
            if(prev + ins.get(i - 1) <= x){
                r++;
            }
            prev = prev + ins.get(i - 1);
        } if(prev + ins.get(i - 1) <= x){
                r++;
            } prev + ins.get(i - 1) <= x prev + ins.get(i - 1) prev ins.get(i - 1) ins.get ins i - 1 i 1 x {
                r++;
            } r++ r prev = prev + ins.get(i - 1) prev prev + ins.get(i - 1) prev ins.get(i - 1) ins.get ins i - 1 i 1 System.out.println(++r) System.out.println System.out System System.out ++r r 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();
        List<Integer> ins = new ArrayList<>();
        for(int i = 0;i < n;i++){
            ins.add(sc.nextInt());
        }
        int prev = 0;
        int r = 0;
        for(int i = 1;i < n + 1;i++){
            if(prev + ins.get(i - 1) <= x){
                r++;
            }
            prev = prev + ins.get(i - 1);
        }
        System.out.println(++r);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int x = sc.nextInt();
        List<Integer> ins = new ArrayList<>();
        for(int i = 0;i < n;i++){
            ins.add(sc.nextInt());
        }
        int prev = 0;
        int r = 0;
        for(int i = 1;i < n + 1;i++){
            if(prev + ins.get(i - 1) <= x){
                r++;
            }
            prev = prev + ins.get(i - 1);
        }
        System.out.println(++r);
    }
} Main
import java.util.ArrayList;
import java.util.List;
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();
        List<Integer> ins = new ArrayList<>();
        for(int i = 0;i < n;i++){
            ins.add(sc.nextInt());
        }
        int prev = 0;
        int r = 0;
        for(int i = 1;i < n + 1;i++){
            if(prev + ins.get(i - 1) <= x){
                r++;
            }
            prev = prev + ins.get(i - 1);
        }
        System.out.println(++r);
    }
}