import java.util.*;

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

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int d = 0,n,x,count = 1;
        
        n = sc.nextInt();
        x = sc.nextInt();
        
        for(int i = 0; i < n ; i++){
            d += sc.nextInt();
            if(d <= x) count++;
            else break;
        }
        System.out.println(count);
        
    }
}