import java.util.*;
import java.lang.*;

public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int x = sc.nextInt();
        int cnt = 1;
        
        int od = 0;
        for (int i = 2; i <= n + 1; i++) {
            int nd = od + sc.nextInt();
            if (nd <= x) {
                cnt++;
            }
            od = nd;
        }
        System.out.println(cnt);
    }
} import java.util.*; util.* java import java.lang.*; lang.* java public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int x = sc.nextInt();
        int cnt = 1;
        
        int od = 0;
        for (int i = 2; i <= n + 1; i++) {
            int nd = od + sc.nextInt();
            if (nd <= x) {
                cnt++;
            }
            od = nd;
        }
        System.out.println(cnt);
    }
} Main public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int x = sc.nextInt();
        int cnt = 1;
        
        int od = 0;
        for (int i = 2; i <= n + 1; i++) {
            int nd = od + sc.nextInt();
            if (nd <= x) {
                cnt++;
            }
            od = nd;
        }
        System.out.println(cnt);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int x = sc.nextInt();
        int cnt = 1;
        
        int od = 0;
        for (int i = 2; i <= n + 1; i++) {
            int nd = od + sc.nextInt();
            if (nd <= x) {
                cnt++;
            }
            od = nd;
        }
        System.out.println(cnt);
    } 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 cnt = 1; cnt 1 int od = 0; od 0 for (int i = 2; i <= n + 1; i++) {
            int nd = od + sc.nextInt();
            if (nd <= x) {
                cnt++;
            }
            od = nd;
        } int i = 2; int i = 2; i 2 i <= n + 1 i n + 1 n 1 i++ i++ i {
            int nd = od + sc.nextInt();
            if (nd <= x) {
                cnt++;
            }
            od = nd;
        } {
            int nd = od + sc.nextInt();
            if (nd <= x) {
                cnt++;
            }
            od = nd;
        } int nd = od + sc.nextInt(); nd od + sc.nextInt() od sc.nextInt() sc.nextInt sc if (nd <= x) {
                cnt++;
            } nd <= x nd x {
                cnt++;
            } cnt++ cnt od = nd od nd System.out.println(cnt) System.out.println System.out System System.out cnt 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 cnt = 1;
        
        int od = 0;
        for (int i = 2; i <= n + 1; i++) {
            int nd = od + sc.nextInt();
            if (nd <= x) {
                cnt++;
            }
            od = nd;
        }
        System.out.println(cnt);
    }
} public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int x = sc.nextInt();
        int cnt = 1;
        
        int od = 0;
        for (int i = 2; i <= n + 1; i++) {
            int nd = od + sc.nextInt();
            if (nd <= x) {
                cnt++;
            }
            od = nd;
        }
        System.out.println(cnt);
    }
} Main
import java.util.*;
import java.lang.*;

public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int x = sc.nextInt();
        int cnt = 1;
        
        int od = 0;
        for (int i = 2; i <= n + 1; i++) {
            int nd = od + sc.nextInt();
            if (nd <= x) {
                cnt++;
            }
            od = nd;
        }
        System.out.println(cnt);
    }
}