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+1];
        int D[] = new int[N+2];
        D[1] = 0;
        for (int i = 1; i <= N; i++) {
            L[i] = scan.nextInt();//3 4 5
        }
        int count=1;
        for (int j = 2; j <= N + 1; j++) {
                D[j] = D[j - 1] + L[j-1]; //座標
                if (X < D[j]){
                    break;
                }
                count++;
        }
        System.out.println(count);
        scan.close();
    }
} 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+1];
        int D[] = new int[N+2];
        D[1] = 0;
        for (int i = 1; i <= N; i++) {
            L[i] = scan.nextInt();//3 4 5
        }
        int count=1;
        for (int j = 2; j <= N + 1; j++) {
                D[j] = D[j - 1] + L[j-1]; //座標
                if (X < D[j]){
                    break;
                }
                count++;
        }
        System.out.println(count);
        scan.close();
    }
} 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+1];
        int D[] = new int[N+2];
        D[1] = 0;
        for (int i = 1; i <= N; i++) {
            L[i] = scan.nextInt();//3 4 5
        }
        int count=1;
        for (int j = 2; j <= N + 1; j++) {
                D[j] = D[j - 1] + L[j-1]; //座標
                if (X < D[j]){
                    break;
                }
                count++;
        }
        System.out.println(count);
        scan.close();
    } main {
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        int X = scan.nextInt();
        int L[] = new int[N+1];
        int D[] = new int[N+2];
        D[1] = 0;
        for (int i = 1; i <= N; i++) {
            L[i] = scan.nextInt();//3 4 5
        }
        int count=1;
        for (int j = 2; j <= N + 1; j++) {
                D[j] = D[j - 1] + L[j-1]; //座標
                if (X < D[j]){
                    break;
                }
                count++;
        }
        System.out.println(count);
        scan.close();
    } 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+1]; L new int[N+1] N+1 N 1 int D[] = new int[N+2]; D new int[N+2] N+2 N 2 D[1] = 0 D[1] D 1 0 for (int i = 1; i <= N; i++) {
            L[i] = scan.nextInt();//3 4 5
        } int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {
            L[i] = scan.nextInt();//3 4 5
        } {
            L[i] = scan.nextInt();//3 4 5
        } L[i] = scan.nextInt() L[i] L i scan.nextInt() scan.nextInt scan int count=1; count 1 for (int j = 2; j <= N + 1; j++) {
                D[j] = D[j - 1] + L[j-1]; //座標
                if (X < D[j]){
                    break;
                }
                count++;
        } int j = 2; int j = 2; j 2 j <= N + 1 j N + 1 N 1 j++ j++ j {
                D[j] = D[j - 1] + L[j-1]; //座標
                if (X < D[j]){
                    break;
                }
                count++;
        } {
                D[j] = D[j - 1] + L[j-1]; //座標
                if (X < D[j]){
                    break;
                }
                count++;
        } D[j] = D[j - 1] + L[j-1] D[j] D j D[j - 1] + L[j-1] D[j - 1] D j - 1 j 1 L[j-1] L j-1 j 1 if (X < D[j]){
                    break;
                } X < D[j] X D[j] D j {
                    break;
                } break; count++ count System.out.println(count) System.out.println System.out System System.out count scan.close() scan.close scan 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+1];
        int D[] = new int[N+2];
        D[1] = 0;
        for (int i = 1; i <= N; i++) {
            L[i] = scan.nextInt();//3 4 5
        }
        int count=1;
        for (int j = 2; j <= N + 1; j++) {
                D[j] = D[j - 1] + L[j-1]; //座標
                if (X < D[j]){
                    break;
                }
                count++;
        }
        System.out.println(count);
        scan.close();
    }
} 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+1];
        int D[] = new int[N+2];
        D[1] = 0;
        for (int i = 1; i <= N; i++) {
            L[i] = scan.nextInt();//3 4 5
        }
        int count=1;
        for (int j = 2; j <= N + 1; j++) {
                D[j] = D[j - 1] + L[j-1]; //座標
                if (X < D[j]){
                    break;
                }
                count++;
        }
        System.out.println(count);
        scan.close();
    }
} 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+1];
        int D[] = new int[N+2];
        D[1] = 0;
        for (int i = 1; i <= N; i++) {
            L[i] = scan.nextInt();//3 4 5
        }
        int count=1;
        for (int j = 2; j <= N + 1; j++) {
                D[j] = D[j - 1] + L[j-1]; //座標
                if (X < D[j]){
                    break;
                }
                count++;
        }
        System.out.println(count);
        scan.close();
    }
}
