import java.io.*;
import java.util.*;

public class Main {

    public static void main(final String[] args) throws Exception {
        final Scanner sc = new Scanner(System.in);
        long N;
        N = sc.nextLong();
        long X;
        X = sc.nextLong();
        long[] L = new long[(int)(N)];
        for(int i = 0 ; i < N ; i++){
                L[i] = sc.nextLong();
        }

        final Solver solver = new Solver();
        solver.solve(N, X, L);
    }
}

class Solver {
    public void solve(long N, long X, long[] L) {
        if (X == 0) {
            System.out.println(0);
            return;
        }

        long D = 0;
        for (int i = 0; i < N; i++) {
            D += L[i];
            if (D > X) {
                System.out.println(i + 1);
                return;
            }
        }

        System.out.println(N+1);
    }
}
 import java.io.*; io.* java import java.util.*; util.* java public class Main {

    public static void main(final String[] args) throws Exception {
        final Scanner sc = new Scanner(System.in);
        long N;
        N = sc.nextLong();
        long X;
        X = sc.nextLong();
        long[] L = new long[(int)(N)];
        for(int i = 0 ; i < N ; i++){
                L[i] = sc.nextLong();
        }

        final Solver solver = new Solver();
        solver.solve(N, X, L);
    }
} Main public static void main(final String[] args) throws Exception {
        final Scanner sc = new Scanner(System.in);
        long N;
        N = sc.nextLong();
        long X;
        X = sc.nextLong();
        long[] L = new long[(int)(N)];
        for(int i = 0 ; i < N ; i++){
                L[i] = sc.nextLong();
        }

        final Solver solver = new Solver();
        solver.solve(N, X, L);
    } main {
        final Scanner sc = new Scanner(System.in);
        long N;
        N = sc.nextLong();
        long X;
        X = sc.nextLong();
        long[] L = new long[(int)(N)];
        for(int i = 0 ; i < N ; i++){
                L[i] = sc.nextLong();
        }

        final Solver solver = new Solver();
        solver.solve(N, X, L);
    } final Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long N; N N = sc.nextLong() N sc.nextLong() sc.nextLong sc long X; X X = sc.nextLong() X sc.nextLong() sc.nextLong sc long[] L = new long[(int)(N)]; L new long[(int)(N)] (int)(N) for(int i = 0 ; i < N ; i++){
                L[i] = sc.nextLong();
        } int i = 0 ; int i = 0 ; i 0 i < N i N i++ i++ i {
                L[i] = sc.nextLong();
        } {
                L[i] = sc.nextLong();
        } L[i] = sc.nextLong() L[i] L i sc.nextLong() sc.nextLong sc final Solver solver = new Solver(); solver new Solver() solver.solve(N, X, L) solver.solve solver N X L final String[] args args class Solver {
    public void solve(long N, long X, long[] L) {
        if (X == 0) {
            System.out.println(0);
            return;
        }

        long D = 0;
        for (int i = 0; i < N; i++) {
            D += L[i];
            if (D > X) {
                System.out.println(i + 1);
                return;
            }
        }

        System.out.println(N+1);
    }
} Solver public void solve(long N, long X, long[] L) {
        if (X == 0) {
            System.out.println(0);
            return;
        }

        long D = 0;
        for (int i = 0; i < N; i++) {
            D += L[i];
            if (D > X) {
                System.out.println(i + 1);
                return;
            }
        }

        System.out.println(N+1);
    } solve {
        if (X == 0) {
            System.out.println(0);
            return;
        }

        long D = 0;
        for (int i = 0; i < N; i++) {
            D += L[i];
            if (D > X) {
                System.out.println(i + 1);
                return;
            }
        }

        System.out.println(N+1);
    } if (X == 0) {
            System.out.println(0);
            return;
        } X == 0 X 0 {
            System.out.println(0);
            return;
        } System.out.println(0) System.out.println System.out System System.out 0 return; long D = 0; D 0 for (int i = 0; i < N; i++) {
            D += L[i];
            if (D > X) {
                System.out.println(i + 1);
                return;
            }
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            D += L[i];
            if (D > X) {
                System.out.println(i + 1);
                return;
            }
        } {
            D += L[i];
            if (D > X) {
                System.out.println(i + 1);
                return;
            }
        } D += L[i] D L[i] L i if (D > X) {
                System.out.println(i + 1);
                return;
            } D > X D X {
                System.out.println(i + 1);
                return;
            } System.out.println(i + 1) System.out.println System.out System System.out i + 1 i 1 return; System.out.println(N+1) System.out.println System.out System System.out N+1 N 1 long N N long X X long[] L L public class Main {

    public static void main(final String[] args) throws Exception {
        final Scanner sc = new Scanner(System.in);
        long N;
        N = sc.nextLong();
        long X;
        X = sc.nextLong();
        long[] L = new long[(int)(N)];
        for(int i = 0 ; i < N ; i++){
                L[i] = sc.nextLong();
        }

        final Solver solver = new Solver();
        solver.solve(N, X, L);
    }
} public class Main {

    public static void main(final String[] args) throws Exception {
        final Scanner sc = new Scanner(System.in);
        long N;
        N = sc.nextLong();
        long X;
        X = sc.nextLong();
        long[] L = new long[(int)(N)];
        for(int i = 0 ; i < N ; i++){
                L[i] = sc.nextLong();
        }

        final Solver solver = new Solver();
        solver.solve(N, X, L);
    }
} Main
import java.io.*;
import java.util.*;

public class Main {

    public static void main(final String[] args) throws Exception {
        final Scanner sc = new Scanner(System.in);
        long N;
        N = sc.nextLong();
        long X;
        X = sc.nextLong();
        long[] L = new long[(int)(N)];
        for(int i = 0 ; i < N ; i++){
                L[i] = sc.nextLong();
        }

        final Solver solver = new Solver();
        solver.solve(N, X, L);
    }
}

class Solver {
    public void solve(long N, long X, long[] L) {
        if (X == 0) {
            System.out.println(0);
            return;
        }

        long D = 0;
        for (int i = 0; i < N; i++) {
            D += L[i];
            if (D > X) {
                System.out.println(i + 1);
                return;
            }
        }

        System.out.println(N+1);
    }
}

