import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        int X = scan.nextInt();
        int[] L = new int[N];
        for (int i = 0; i < N; i++) L[i] = scan.nextInt();
        int ans = 1, count = 0;
        for (int i = 0; i < N; i++) {
            count += L[i];
            if (count <= X) ++ans;
        }
        System.out.println(ans);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        int X = scan.nextInt();
        int[] L = new int[N];
        for (int i = 0; i < N; i++) L[i] = scan.nextInt();
        int ans = 1, count = 0;
        for (int i = 0; i < N; i++) {
            count += L[i];
            if (count <= X) ++ans;
        }
        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        int X = scan.nextInt();
        int[] L = new int[N];
        for (int i = 0; i < N; i++) L[i] = scan.nextInt();
        int ans = 1, count = 0;
        for (int i = 0; i < N; i++) {
            count += L[i];
            if (count <= X) ++ans;
        }
        System.out.println(ans);
    } main {
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        int X = scan.nextInt();
        int[] L = new int[N];
        for (int i = 0; i < N; i++) L[i] = scan.nextInt();
        int ans = 1, count = 0;
        for (int i = 0; i < N; i++) {
            count += L[i];
            if (count <= X) ++ans;
        }
        System.out.println(ans);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan int X = scan.nextInt(); X scan.nextInt() scan.nextInt scan int[] L = new int[N]; L new int[N] N for (int i = 0; i < N; i++) L[i] = scan.nextInt(); int i = 0; int i = 0; i 0 i < N i N i++ i++ i L[i] = scan.nextInt(); L[i] = scan.nextInt() L[i] L i scan.nextInt() scan.nextInt scan int ans = 1 ans 1 count = 0; count 0 for (int i = 0; i < N; i++) {
            count += L[i];
            if (count <= X) ++ans;
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            count += L[i];
            if (count <= X) ++ans;
        } {
            count += L[i];
            if (count <= X) ++ans;
        } count += L[i] count L[i] L i if (count <= X) ++ans; count <= X count X ++ans ans 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 scan = new Scanner(System.in);
        int N = scan.nextInt();
        int X = scan.nextInt();
        int[] L = new int[N];
        for (int i = 0; i < N; i++) L[i] = scan.nextInt();
        int ans = 1, count = 0;
        for (int i = 0; i < N; i++) {
            count += L[i];
            if (count <= X) ++ans;
        }
        System.out.println(ans);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        int X = scan.nextInt();
        int[] L = new int[N];
        for (int i = 0; i < N; i++) L[i] = scan.nextInt();
        int ans = 1, count = 0;
        for (int i = 0; i < N; i++) {
            count += L[i];
            if (count <= X) ++ans;
        }
        System.out.println(ans);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        int X = scan.nextInt();
        int[] L = new int[N];
        for (int i = 0; i < N; i++) L[i] = scan.nextInt();
        int ans = 1, count = 0;
        for (int i = 0; i < N; i++) {
            count += L[i];
            if (count <= X) ++ans;
        }
        System.out.println(ans);
    }
}