import java.util.*;
import java.math.*;
     
class Main{
    public static void main(String[] args) {
        
        try(Scanner sc = new Scanner(System.in)){

            int n = Integer.parseInt(sc.next());
            int x = Integer.parseInt(sc.next());

            int sum = 0;
            int count = 1;

            for(int i = 0; i < n; i ++){
                sum += Integer.parseInt(sc.next());
                if(sum <= x) count++;
                else break;
            }

            System.out.println(count);

        }catch(Exception e){
            e.printStackTrace();
        }        
    }
} import java.util.*; util.* java import java.math.*; math.* java class Main{
    public static void main(String[] args) {
        
        try(Scanner sc = new Scanner(System.in)){

            int n = Integer.parseInt(sc.next());
            int x = Integer.parseInt(sc.next());

            int sum = 0;
            int count = 1;

            for(int i = 0; i < n; i ++){
                sum += Integer.parseInt(sc.next());
                if(sum <= x) count++;
                else break;
            }

            System.out.println(count);

        }catch(Exception e){
            e.printStackTrace();
        }        
    }
} Main public static void main(String[] args) {
        
        try(Scanner sc = new Scanner(System.in)){

            int n = Integer.parseInt(sc.next());
            int x = Integer.parseInt(sc.next());

            int sum = 0;
            int count = 1;

            for(int i = 0; i < n; i ++){
                sum += Integer.parseInt(sc.next());
                if(sum <= x) count++;
                else break;
            }

            System.out.println(count);

        }catch(Exception e){
            e.printStackTrace();
        }        
    } main {
        
        try(Scanner sc = new Scanner(System.in)){

            int n = Integer.parseInt(sc.next());
            int x = Integer.parseInt(sc.next());

            int sum = 0;
            int count = 1;

            for(int i = 0; i < n; i ++){
                sum += Integer.parseInt(sc.next());
                if(sum <= x) count++;
                else break;
            }

            System.out.println(count);

        }catch(Exception e){
            e.printStackTrace();
        }        
    } try(Scanner sc = new Scanner(System.in)){

            int n = Integer.parseInt(sc.next());
            int x = Integer.parseInt(sc.next());

            int sum = 0;
            int count = 1;

            for(int i = 0; i < n; i ++){
                sum += Integer.parseInt(sc.next());
                if(sum <= x) count++;
                else break;
            }

            System.out.println(count);

        }catch(Exception e){
            e.printStackTrace();
        } catch(Exception e){
            e.printStackTrace();
        } Exception e {
            e.printStackTrace();
        } e.printStackTrace() e.printStackTrace e {

            int n = Integer.parseInt(sc.next());
            int x = Integer.parseInt(sc.next());

            int sum = 0;
            int count = 1;

            for(int i = 0; i < n; i ++){
                sum += Integer.parseInt(sc.next());
                if(sum <= x) count++;
                else break;
            }

            System.out.println(count);

        } Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int x = Integer.parseInt(sc.next()); x Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int sum = 0; sum 0 int count = 1; count 1 for(int i = 0; i < n; i ++){
                sum += Integer.parseInt(sc.next());
                if(sum <= x) count++;
                else break;
            } int i = 0; int i = 0; i 0 i < n i n i ++ i ++ i {
                sum += Integer.parseInt(sc.next());
                if(sum <= x) count++;
                else break;
            } {
                sum += Integer.parseInt(sc.next());
                if(sum <= x) count++;
                else break;
            } sum += Integer.parseInt(sc.next()) sum Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc if(sum <= x) count++;
                else break; sum <= x sum x count++ count break; System.out.println(count) System.out.println System.out System System.out count String[] args args
import java.util.*;
import java.math.*;
     
class Main{
    public static void main(String[] args) {
        
        try(Scanner sc = new Scanner(System.in)){

            int n = Integer.parseInt(sc.next());
            int x = Integer.parseInt(sc.next());

            int sum = 0;
            int count = 1;

            for(int i = 0; i < n; i ++){
                sum += Integer.parseInt(sc.next());
                if(sum <= x) count++;
                else break;
            }

            System.out.println(count);

        }catch(Exception e){
            e.printStackTrace();
        }        
    }
}
