
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        int x = s.nextInt();
        List<Integer> list = new ArrayList<>();
        for(int i =0;i<n;i++){
            list.add(s.nextInt());
        }
        int count = 0;
        int d =0;
        int i=0;
        while(d<=x){
            count++;
            if(i==n) break;
            d+=list.get(i);
            i++;
        }
        System.out.println(count);
    }
} 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 s = new Scanner(System.in);
        int n = s.nextInt();
        int x = s.nextInt();
        List<Integer> list = new ArrayList<>();
        for(int i =0;i<n;i++){
            list.add(s.nextInt());
        }
        int count = 0;
        int d =0;
        int i=0;
        while(d<=x){
            count++;
            if(i==n) break;
            d+=list.get(i);
            i++;
        }
        System.out.println(count);
    }
} Main public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        int x = s.nextInt();
        List<Integer> list = new ArrayList<>();
        for(int i =0;i<n;i++){
            list.add(s.nextInt());
        }
        int count = 0;
        int d =0;
        int i=0;
        while(d<=x){
            count++;
            if(i==n) break;
            d+=list.get(i);
            i++;
        }
        System.out.println(count);
    } main {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        int x = s.nextInt();
        List<Integer> list = new ArrayList<>();
        for(int i =0;i<n;i++){
            list.add(s.nextInt());
        }
        int count = 0;
        int d =0;
        int i=0;
        while(d<=x){
            count++;
            if(i==n) break;
            d+=list.get(i);
            i++;
        }
        System.out.println(count);
    } Scanner s = new Scanner(System.in); s new Scanner(System.in) int n = s.nextInt(); n s.nextInt() s.nextInt s int x = s.nextInt(); x s.nextInt() s.nextInt s List<Integer> list = new ArrayList<>(); list new ArrayList<>() for(int i =0;i<n;i++){
            list.add(s.nextInt());
        } int i =0; int i =0; i 0 i<n i n i++ i++ i {
            list.add(s.nextInt());
        } {
            list.add(s.nextInt());
        } list.add(s.nextInt()) list.add list s.nextInt() s.nextInt s int count = 0; count 0 int d =0; d 0 int i=0; i 0 while(d<=x){
            count++;
            if(i==n) break;
            d+=list.get(i);
            i++;
        } d<=x d x {
            count++;
            if(i==n) break;
            d+=list.get(i);
            i++;
        } count++ count if(i==n) break; i==n i n break; d+=list.get(i) d list.get(i) list.get list i i++ i System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        int x = s.nextInt();
        List<Integer> list = new ArrayList<>();
        for(int i =0;i<n;i++){
            list.add(s.nextInt());
        }
        int count = 0;
        int d =0;
        int i=0;
        while(d<=x){
            count++;
            if(i==n) break;
            d+=list.get(i);
            i++;
        }
        System.out.println(count);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        int x = s.nextInt();
        List<Integer> list = new ArrayList<>();
        for(int i =0;i<n;i++){
            list.add(s.nextInt());
        }
        int count = 0;
        int d =0;
        int i=0;
        while(d<=x){
            count++;
            if(i==n) break;
            d+=list.get(i);
            i++;
        }
        System.out.println(count);
    }
} Main

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        int x = s.nextInt();
        List<Integer> list = new ArrayList<>();
        for(int i =0;i<n;i++){
            list.add(s.nextInt());
        }
        int count = 0;
        int d =0;
        int i=0;
        while(d<=x){
            count++;
            if(i==n) break;
            d+=list.get(i);
            i++;
        }
        System.out.println(count);
    }
}
