// package app;

import java.math.BigDecimal;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util.Scanner;
import java.util.StringJoiner;
import java.util.stream.Stream;

public class Main {

    public static void main(final String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);

        // long u = sc.nextLong();
        // long D = sc.nextLong();
        // long K = sc.nextLong();

        int N = sc.nextInt();
        int X = sc.nextInt();

        int[] L = new int[N + 1];

        for (int i = 1; i < N + 1; i++) {
            L[i] = sc.nextInt();
        }

        int boundCnt = 1;
        int distance = 0;
        for (int i = 1; i < N + 1; i++) {
            distance += L[i];
            if (distance > X) break;
            boundCnt++;
        }


        System.out.println(boundCnt);
    }
} import java.math.BigDecimal; BigDecimal java.math import java.util.Arrays; Arrays java.util import java.util.HashMap; HashMap java.util import java.util.Map; Map java.util import java.util.Objects; Objects java.util import java.util.Scanner; Scanner java.util import java.util.StringJoiner; StringJoiner java.util import java.util.stream.Stream; Stream java.util.stream public class Main {

    public static void main(final String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);

        // long u = sc.nextLong();
        // long D = sc.nextLong();
        // long K = sc.nextLong();

        int N = sc.nextInt();
        int X = sc.nextInt();

        int[] L = new int[N + 1];

        for (int i = 1; i < N + 1; i++) {
            L[i] = sc.nextInt();
        }

        int boundCnt = 1;
        int distance = 0;
        for (int i = 1; i < N + 1; i++) {
            distance += L[i];
            if (distance > X) break;
            boundCnt++;
        }


        System.out.println(boundCnt);
    }
} Main public static void main(final String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);

        // long u = sc.nextLong();
        // long D = sc.nextLong();
        // long K = sc.nextLong();

        int N = sc.nextInt();
        int X = sc.nextInt();

        int[] L = new int[N + 1];

        for (int i = 1; i < N + 1; i++) {
            L[i] = sc.nextInt();
        }

        int boundCnt = 1;
        int distance = 0;
        for (int i = 1; i < N + 1; i++) {
            distance += L[i];
            if (distance > X) break;
            boundCnt++;
        }


        System.out.println(boundCnt);
    } main {

        Scanner sc = new Scanner(System.in);

        // long u = sc.nextLong();
        // long D = sc.nextLong();
        // long K = sc.nextLong();

        int N = sc.nextInt();
        int X = sc.nextInt();

        int[] L = new int[N + 1];

        for (int i = 1; i < N + 1; i++) {
            L[i] = sc.nextInt();
        }

        int boundCnt = 1;
        int distance = 0;
        for (int i = 1; i < N + 1; i++) {
            distance += L[i];
            if (distance > X) break;
            boundCnt++;
        }


        System.out.println(boundCnt);
    } 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[] L = new int[N + 1]; L new int[N + 1] N + 1 N 1 for (int i = 1; i < N + 1; i++) {
            L[i] = sc.nextInt();
        } int i = 1; int i = 1; i 1 i < N + 1 i N + 1 N 1 i++ i++ i {
            L[i] = sc.nextInt();
        } {
            L[i] = sc.nextInt();
        } L[i] = sc.nextInt() L[i] L i sc.nextInt() sc.nextInt sc int boundCnt = 1; boundCnt 1 int distance = 0; distance 0 for (int i = 1; i < N + 1; i++) {
            distance += L[i];
            if (distance > X) break;
            boundCnt++;
        } int i = 1; int i = 1; i 1 i < N + 1 i N + 1 N 1 i++ i++ i {
            distance += L[i];
            if (distance > X) break;
            boundCnt++;
        } {
            distance += L[i];
            if (distance > X) break;
            boundCnt++;
        } distance += L[i] distance L[i] L i if (distance > X) break; distance > X distance X break; boundCnt++ boundCnt System.out.println(boundCnt) System.out.println System.out System System.out boundCnt final String[] args args public class Main {

    public static void main(final String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);

        // long u = sc.nextLong();
        // long D = sc.nextLong();
        // long K = sc.nextLong();

        int N = sc.nextInt();
        int X = sc.nextInt();

        int[] L = new int[N + 1];

        for (int i = 1; i < N + 1; i++) {
            L[i] = sc.nextInt();
        }

        int boundCnt = 1;
        int distance = 0;
        for (int i = 1; i < N + 1; i++) {
            distance += L[i];
            if (distance > X) break;
            boundCnt++;
        }


        System.out.println(boundCnt);
    }
} public class Main {

    public static void main(final String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);

        // long u = sc.nextLong();
        // long D = sc.nextLong();
        // long K = sc.nextLong();

        int N = sc.nextInt();
        int X = sc.nextInt();

        int[] L = new int[N + 1];

        for (int i = 1; i < N + 1; i++) {
            L[i] = sc.nextInt();
        }

        int boundCnt = 1;
        int distance = 0;
        for (int i = 1; i < N + 1; i++) {
            distance += L[i];
            if (distance > X) break;
            boundCnt++;
        }


        System.out.println(boundCnt);
    }
} Main
// package app;

import java.math.BigDecimal;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util.Scanner;
import java.util.StringJoiner;
import java.util.stream.Stream;

public class Main {

    public static void main(final String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);

        // long u = sc.nextLong();
        // long D = sc.nextLong();
        // long K = sc.nextLong();

        int N = sc.nextInt();
        int X = sc.nextInt();

        int[] L = new int[N + 1];

        for (int i = 1; i < N + 1; i++) {
            L[i] = sc.nextInt();
        }

        int boundCnt = 1;
        int distance = 0;
        for (int i = 1; i < N + 1; i++) {
            distance += L[i];
            if (distance > X) break;
            boundCnt++;
        }


        System.out.println(boundCnt);
    }
}