import java.util.Scanner;

public class Main {

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

        int d = 0;
        int counter = 1;
        for (int i = 0; i < n; i++) {
            d = d + sc.nextInt();
            if (d <= x) {
                counter++;
            } else {
                break;
            }
        }

        System.out.println(counter);

        sc.close();
    }

} import java.util.Scanner; Scanner java.util public class Main {

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

        int d = 0;
        int counter = 1;
        for (int i = 0; i < n; i++) {
            d = d + sc.nextInt();
            if (d <= x) {
                counter++;
            } else {
                break;
            }
        }

        System.out.println(counter);

        sc.close();
    }

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

        int d = 0;
        int counter = 1;
        for (int i = 0; i < n; i++) {
            d = d + sc.nextInt();
            if (d <= x) {
                counter++;
            } else {
                break;
            }
        }

        System.out.println(counter);

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

        int d = 0;
        int counter = 1;
        for (int i = 0; i < n; i++) {
            d = d + sc.nextInt();
            if (d <= x) {
                counter++;
            } else {
                break;
            }
        }

        System.out.println(counter);

        sc.close();
    } 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 d = 0; d 0 int counter = 1; counter 1 for (int i = 0; i < n; i++) {
            d = d + sc.nextInt();
            if (d <= x) {
                counter++;
            } else {
                break;
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            d = d + sc.nextInt();
            if (d <= x) {
                counter++;
            } else {
                break;
            }
        } {
            d = d + sc.nextInt();
            if (d <= x) {
                counter++;
            } else {
                break;
            }
        } d = d + sc.nextInt() d d + sc.nextInt() d sc.nextInt() sc.nextInt sc if (d <= x) {
                counter++;
            } else {
                break;
            } d <= x d x {
                counter++;
            } counter++ counter {
                break;
            } break; System.out.println(counter) System.out.println System.out System System.out counter sc.close() sc.close sc String[] args args public class Main {

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

        int d = 0;
        int counter = 1;
        for (int i = 0; i < n; i++) {
            d = d + sc.nextInt();
            if (d <= x) {
                counter++;
            } else {
                break;
            }
        }

        System.out.println(counter);

        sc.close();
    }

} public class Main {

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

        int d = 0;
        int counter = 1;
        for (int i = 0; i < n; i++) {
            d = d + sc.nextInt();
            if (d <= x) {
                counter++;
            } else {
                break;
            }
        }

        System.out.println(counter);

        sc.close();
    }

} Main
import java.util.Scanner;

public class Main {

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

        int d = 0;
        int counter = 1;
        for (int i = 0; i < n; i++) {
            d = d + sc.nextInt();
            if (d <= x) {
                counter++;
            } else {
                break;
            }
        }

        System.out.println(counter);

        sc.close();
    }

}
