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();
        
        int sum=0,cnt;
        for(cnt=0; cnt<N; cnt++) {
            sum += sc.nextInt();
            if(sum > X) break;
        }
        
        System.out.println(cnt+1);
    }
} 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();
        
        int sum=0,cnt;
        for(cnt=0; cnt<N; cnt++) {
            sum += sc.nextInt();
            if(sum > X) break;
        }
        
        System.out.println(cnt+1);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int X = sc.nextInt();
        
        int sum=0,cnt;
        for(cnt=0; cnt<N; cnt++) {
            sum += sc.nextInt();
            if(sum > X) break;
        }
        
        System.out.println(cnt+1);
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int X = sc.nextInt();
        
        int sum=0,cnt;
        for(cnt=0; cnt<N; cnt++) {
            sum += sc.nextInt();
            if(sum > X) break;
        }
        
        System.out.println(cnt+1);
    } 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 int sum=0 sum 0 cnt; cnt for(cnt=0; cnt<N; cnt++) {
            sum += sc.nextInt();
            if(sum > X) break;
        } cnt=0; cnt=0 cnt 0 cnt<N cnt N cnt++ cnt++ cnt {
            sum += sc.nextInt();
            if(sum > X) break;
        } {
            sum += sc.nextInt();
            if(sum > X) break;
        } sum += sc.nextInt() sum sc.nextInt() sc.nextInt sc if(sum > X) break; sum > X sum X break; System.out.println(cnt+1) System.out.println System.out System System.out cnt+1 cnt 1 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();
        
        int sum=0,cnt;
        for(cnt=0; cnt<N; cnt++) {
            sum += sc.nextInt();
            if(sum > X) break;
        }
        
        System.out.println(cnt+1);
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int X = sc.nextInt();
        
        int sum=0,cnt;
        for(cnt=0; cnt<N; cnt++) {
            sum += sc.nextInt();
            if(sum > X) break;
        }
        
        System.out.println(cnt+1);
    }
} Main
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();
        
        int sum=0,cnt;
        for(cnt=0; cnt<N; cnt++) {
            sum += sc.nextInt();
            if(sum > X) break;
        }
        
        System.out.println(cnt+1);
    }
}
