import java.util.*;

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

public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int l = Integer.parseInt(sc.next());
        int[] x = new int[n+1];
        x[0] = 0;
        for(int i = 1;i<n+1;i++){
            x[i] = x[i-1] + Integer.parseInt(sc.next());
        }
        int ans = 0;
        for(int i = 0;i<n+1;i++){
            if(x[i] > l){
                ans = i;
                break;
            }
            if(i == n){
                ans = i + 1;
            }
        }
        System.out.println(ans);
    }
}