import java.util.*;

class Main{
    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);        
        int n = stdIn.nextInt();
        int x = stdIn.nextInt();
        int count = 1;
        int sum = 0;
        while(n-- > 0){
            sum += stdIn.nextInt();
            if(x < sum) break;
            count++;
        }
        System.out.println(count);

    }
} import java.util.*; util.* java class Main{
    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);        
        int n = stdIn.nextInt();
        int x = stdIn.nextInt();
        int count = 1;
        int sum = 0;
        while(n-- > 0){
            sum += stdIn.nextInt();
            if(x < sum) break;
            count++;
        }
        System.out.println(count);

    }
} Main public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);        
        int n = stdIn.nextInt();
        int x = stdIn.nextInt();
        int count = 1;
        int sum = 0;
        while(n-- > 0){
            sum += stdIn.nextInt();
            if(x < sum) break;
            count++;
        }
        System.out.println(count);

    } main {
        Scanner stdIn = new Scanner(System.in);        
        int n = stdIn.nextInt();
        int x = stdIn.nextInt();
        int count = 1;
        int sum = 0;
        while(n-- > 0){
            sum += stdIn.nextInt();
            if(x < sum) break;
            count++;
        }
        System.out.println(count);

    } Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) int n = stdIn.nextInt(); n stdIn.nextInt() stdIn.nextInt stdIn int x = stdIn.nextInt(); x stdIn.nextInt() stdIn.nextInt stdIn int count = 1; count 1 int sum = 0; sum 0 while(n-- > 0){
            sum += stdIn.nextInt();
            if(x < sum) break;
            count++;
        } n-- > 0 n-- n 0 {
            sum += stdIn.nextInt();
            if(x < sum) break;
            count++;
        } sum += stdIn.nextInt() sum stdIn.nextInt() stdIn.nextInt stdIn if(x < sum) break; x < sum x sum break; count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args
import java.util.*;

class Main{
    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);        
        int n = stdIn.nextInt();
        int x = stdIn.nextInt();
        int count = 1;
        int sum = 0;
        while(n-- > 0){
            sum += stdIn.nextInt();
            if(x < sum) break;
            count++;
        }
        System.out.println(count);

    }
}