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