import java.io.InputStream;
import java.io.PrintStream;
import java.util.Scanner;

public class Main {
    static final int MAX = 100100;
    InputStream in = System.in;
    PrintStream out = System.out;
    // static int dp[][] = new int[MAX][MAX];
    static int L[] = new int[110];

    public void _main(String[] args) {
        Scanner sc = new Scanner(in);
        int N = sc.nextInt();
        int X = sc.nextInt();
        for(int i=0;i<N;i++) L[i] = sc.nextInt();

/*        int d=0,i=0;
        while (d<=X) {
            if (i<N) d += L[i++];
            else {
                i++;
                break;
            }
        }*/
        int cnt=1,d=0;
        for (int i=1;i<=X;i++) {
            if (cnt-1<N && d+L[cnt-1] <= X) d+=L[cnt++-1];
        }
        out.println(cnt);
    }

    public static void main(String[] args) {
        new Main()._main(args);
    }
} import java.io.InputStream; InputStream java.io import java.io.PrintStream; PrintStream java.io import java.util.Scanner; Scanner java.util public class Main {
    static final int MAX = 100100;
    InputStream in = System.in;
    PrintStream out = System.out;
    // static int dp[][] = new int[MAX][MAX];
    static int L[] = new int[110];

    public void _main(String[] args) {
        Scanner sc = new Scanner(in);
        int N = sc.nextInt();
        int X = sc.nextInt();
        for(int i=0;i<N;i++) L[i] = sc.nextInt();

/*        int d=0,i=0;
        while (d<=X) {
            if (i<N) d += L[i++];
            else {
                i++;
                break;
            }
        }*/
        int cnt=1,d=0;
        for (int i=1;i<=X;i++) {
            if (cnt-1<N && d+L[cnt-1] <= X) d+=L[cnt++-1];
        }
        out.println(cnt);
    }

    public static void main(String[] args) {
        new Main()._main(args);
    }
} Main static final int MAX = 100100; MAX 100100 InputStream in = System.in; in System.in System System.in PrintStream out = System.out; out System.out System System.out // static int dp[][] = new int[MAX][MAX];
    static int L[] = new int[110]; L new int[110] 110 public void _main(String[] args) {
        Scanner sc = new Scanner(in);
        int N = sc.nextInt();
        int X = sc.nextInt();
        for(int i=0;i<N;i++) L[i] = sc.nextInt();

/*        int d=0,i=0;
        while (d<=X) {
            if (i<N) d += L[i++];
            else {
                i++;
                break;
            }
        }*/
        int cnt=1,d=0;
        for (int i=1;i<=X;i++) {
            if (cnt-1<N && d+L[cnt-1] <= X) d+=L[cnt++-1];
        }
        out.println(cnt);
    } _main {
        Scanner sc = new Scanner(in);
        int N = sc.nextInt();
        int X = sc.nextInt();
        for(int i=0;i<N;i++) L[i] = sc.nextInt();

/*        int d=0,i=0;
        while (d<=X) {
            if (i<N) d += L[i++];
            else {
                i++;
                break;
            }
        }*/
        int cnt=1,d=0;
        for (int i=1;i<=X;i++) {
            if (cnt-1<N && d+L[cnt-1] <= X) d+=L[cnt++-1];
        }
        out.println(cnt);
    } Scanner sc = new Scanner(in); sc new Scanner(in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int X = sc.nextInt(); X sc.nextInt() sc.nextInt sc for(int i=0;i<N;i++) L[i] = sc.nextInt(); int i=0; int i=0; i 0 i<N i N i++ i++ i L[i] = sc.nextInt(); L[i] = sc.nextInt() L[i] L i sc.nextInt() sc.nextInt sc int cnt=1 cnt 1 d=0; d 0 for (int i=1;i<=X;i++) {
            if (cnt-1<N && d+L[cnt-1] <= X) d+=L[cnt++-1];
        } int i=1; int i=1; i 1 i<=X i X i++ i++ i {
            if (cnt-1<N && d+L[cnt-1] <= X) d+=L[cnt++-1];
        } {
            if (cnt-1<N && d+L[cnt-1] <= X) d+=L[cnt++-1];
        } if (cnt-1<N && d+L[cnt-1] <= X) d+=L[cnt++-1]; cnt-1<N && d+L[cnt-1] <= X cnt-1<N cnt-1 cnt 1 N d+L[cnt-1] <= X d+L[cnt-1] d L[cnt-1] L cnt-1 cnt 1 X d+=L[cnt++-1] d L[cnt++-1] L cnt++-1 cnt++ cnt 1 out.println(cnt) out.println out cnt String[] args args public static void main(String[] args) {
        new Main()._main(args);
    } main {
        new Main()._main(args);
    } new Main()._main(args) new Main()._main new Main() args String[] args args public class Main {
    static final int MAX = 100100;
    InputStream in = System.in;
    PrintStream out = System.out;
    // static int dp[][] = new int[MAX][MAX];
    static int L[] = new int[110];

    public void _main(String[] args) {
        Scanner sc = new Scanner(in);
        int N = sc.nextInt();
        int X = sc.nextInt();
        for(int i=0;i<N;i++) L[i] = sc.nextInt();

/*        int d=0,i=0;
        while (d<=X) {
            if (i<N) d += L[i++];
            else {
                i++;
                break;
            }
        }*/
        int cnt=1,d=0;
        for (int i=1;i<=X;i++) {
            if (cnt-1<N && d+L[cnt-1] <= X) d+=L[cnt++-1];
        }
        out.println(cnt);
    }

    public static void main(String[] args) {
        new Main()._main(args);
    }
} public class Main {
    static final int MAX = 100100;
    InputStream in = System.in;
    PrintStream out = System.out;
    // static int dp[][] = new int[MAX][MAX];
    static int L[] = new int[110];

    public void _main(String[] args) {
        Scanner sc = new Scanner(in);
        int N = sc.nextInt();
        int X = sc.nextInt();
        for(int i=0;i<N;i++) L[i] = sc.nextInt();

/*        int d=0,i=0;
        while (d<=X) {
            if (i<N) d += L[i++];
            else {
                i++;
                break;
            }
        }*/
        int cnt=1,d=0;
        for (int i=1;i<=X;i++) {
            if (cnt-1<N && d+L[cnt-1] <= X) d+=L[cnt++-1];
        }
        out.println(cnt);
    }

    public static void main(String[] args) {
        new Main()._main(args);
    }
} Main
import java.io.InputStream;
import java.io.PrintStream;
import java.util.Scanner;

public class Main {
    static final int MAX = 100100;
    InputStream in = System.in;
    PrintStream out = System.out;
    // static int dp[][] = new int[MAX][MAX];
    static int L[] = new int[110];

    public void _main(String[] args) {
        Scanner sc = new Scanner(in);
        int N = sc.nextInt();
        int X = sc.nextInt();
        for(int i=0;i<N;i++) L[i] = sc.nextInt();

/*        int d=0,i=0;
        while (d<=X) {
            if (i<N) d += L[i++];
            else {
                i++;
                break;
            }
        }*/
        int cnt=1,d=0;
        for (int i=1;i<=X;i++) {
            if (cnt-1<N && d+L[cnt-1] <= X) d+=L[cnt++-1];
        }
        out.println(cnt);
    }

    public static void main(String[] args) {
        new Main()._main(args);
    }
}
