import java.util.Scanner;

class Main {
    public static void main(final String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int x = scan.nextInt();

        int[] l = new int[n];
        int bound = 0;
        int cnt = 1;
        for (int i = 0; i < n; i++) {
            bound += scan.nextInt();
            if (bound > x) {
                break;
            }
            cnt++;
        }
        System.out.println(cnt);
    }
} import java.util.Scanner; Scanner java.util class Main {
    public static void main(final String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int x = scan.nextInt();

        int[] l = new int[n];
        int bound = 0;
        int cnt = 1;
        for (int i = 0; i < n; i++) {
            bound += scan.nextInt();
            if (bound > x) {
                break;
            }
            cnt++;
        }
        System.out.println(cnt);
    }
} Main public static void main(final String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int x = scan.nextInt();

        int[] l = new int[n];
        int bound = 0;
        int cnt = 1;
        for (int i = 0; i < n; i++) {
            bound += scan.nextInt();
            if (bound > x) {
                break;
            }
            cnt++;
        }
        System.out.println(cnt);
    } main {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int x = scan.nextInt();

        int[] l = new int[n];
        int bound = 0;
        int cnt = 1;
        for (int i = 0; i < n; i++) {
            bound += scan.nextInt();
            if (bound > x) {
                break;
            }
            cnt++;
        }
        System.out.println(cnt);
    } 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 int bound = 0; bound 0 int cnt = 1; cnt 1 for (int i = 0; i < n; i++) {
            bound += scan.nextInt();
            if (bound > x) {
                break;
            }
            cnt++;
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            bound += scan.nextInt();
            if (bound > x) {
                break;
            }
            cnt++;
        } {
            bound += scan.nextInt();
            if (bound > x) {
                break;
            }
            cnt++;
        } bound += scan.nextInt() bound scan.nextInt() scan.nextInt scan if (bound > x) {
                break;
            } bound > x bound x {
                break;
            } break; cnt++ cnt System.out.println(cnt) System.out.println System.out System System.out cnt final String[] args args
import java.util.Scanner;

class Main {
    public static void main(final String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int x = scan.nextInt();

        int[] l = new int[n];
        int bound = 0;
        int cnt = 1;
        for (int i = 0; i < n; i++) {
            bound += scan.nextInt();
            if (bound > x) {
                break;
            }
            cnt++;
        }
        System.out.println(cnt);
    }
}
