import java.util.Scanner;

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

        int count = 1;
        int d = 0;
        for (int i = 0; i < n; i++) {
            int l = in.nextInt();
            d = d + l;
            if (d <= x) {
                count++;
            }
        }

        System.out.println(count);

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

        int count = 1;
        int d = 0;
        for (int i = 0; i < n; i++) {
            int l = in.nextInt();
            d = d + l;
            if (d <= x) {
                count++;
            }
        }

        System.out.println(count);

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

        int count = 1;
        int d = 0;
        for (int i = 0; i < n; i++) {
            int l = in.nextInt();
            d = d + l;
            if (d <= x) {
                count++;
            }
        }

        System.out.println(count);

    } main {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int x = in.nextInt();

        int count = 1;
        int d = 0;
        for (int i = 0; i < n; i++) {
            int l = in.nextInt();
            d = d + l;
            if (d <= x) {
                count++;
            }
        }

        System.out.println(count);

    } Scanner in = new Scanner(System.in); in new Scanner(System.in) int n = in.nextInt(); n in.nextInt() in.nextInt in int x = in.nextInt(); x in.nextInt() in.nextInt in int count = 1; count 1 int d = 0; d 0 for (int i = 0; i < n; i++) {
            int l = in.nextInt();
            d = d + l;
            if (d <= x) {
                count++;
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            int l = in.nextInt();
            d = d + l;
            if (d <= x) {
                count++;
            }
        } {
            int l = in.nextInt();
            d = d + l;
            if (d <= x) {
                count++;
            }
        } int l = in.nextInt(); l in.nextInt() in.nextInt in d = d + l d d + l d l if (d <= x) {
                count++;
            } d <= x d x {
                count++;
            } count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int x = in.nextInt();

        int count = 1;
        int d = 0;
        for (int i = 0; i < n; i++) {
            int l = in.nextInt();
            d = d + l;
            if (d <= x) {
                count++;
            }
        }

        System.out.println(count);

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

        int count = 1;
        int d = 0;
        for (int i = 0; i < n; i++) {
            int l = in.nextInt();
            d = d + l;
            if (d <= x) {
                count++;
            }
        }

        System.out.println(count);

    }
} Main
import java.util.Scanner;

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

        int count = 1;
        int d = 0;
        for (int i = 0; i < n; i++) {
            int l = in.nextInt();
            d = d + l;
            if (d <= x) {
                count++;
            }
        }

        System.out.println(count);

    }
}
