import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

/**
 * AtCoder Beginner Contest 130<br>
 * B - Bounding<br>
 * <br>
 * https://atcoder.jp/contests/abc130/tasks/abc130_b<br>
 */
public class Main {

    public static void main(String[] args) {

        // 入力
        InputValues value = input(System.in);

        // 計算
        int result = calc(value);

        // 出力
        System.out.println(result);
    }

    private static InputValues input(InputStream in) {
        InputValues inputs = new InputValues();

        try (Scanner sc = new Scanner(System.in)) {
            String[] input1 = sc.nextLine().split(" ");
            String[] input2 = sc.nextLine().split(" ");

            inputs.N = Integer.parseInt(input1[0]);
            inputs.X = Integer.parseInt(input1[1]);

            for (String str : input2) {
                inputs.list.add(Integer.parseInt(str));
            }
        }
        return inputs;
    }

    private static int calc(InputValues inputs) {
        int ans = 0;
        int count = 1;
        for (int i = 0; i < inputs.N; i++) {
            ans = ans + inputs.list.get(i);
            if (inputs.X < ans) {
                break;
            }
            count++;
        }
        return count;
    }

    private static class InputValues {
        int N;
        int X;
        List<Integer> list = new ArrayList<Integer>();
    }
} import java.io.InputStream; InputStream java.io import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {

        // 入力
        InputValues value = input(System.in);

        // 計算
        int result = calc(value);

        // 出力
        System.out.println(result);
    }

    private static InputValues input(InputStream in) {
        InputValues inputs = new InputValues();

        try (Scanner sc = new Scanner(System.in)) {
            String[] input1 = sc.nextLine().split(" ");
            String[] input2 = sc.nextLine().split(" ");

            inputs.N = Integer.parseInt(input1[0]);
            inputs.X = Integer.parseInt(input1[1]);

            for (String str : input2) {
                inputs.list.add(Integer.parseInt(str));
            }
        }
        return inputs;
    }

    private static int calc(InputValues inputs) {
        int ans = 0;
        int count = 1;
        for (int i = 0; i < inputs.N; i++) {
            ans = ans + inputs.list.get(i);
            if (inputs.X < ans) {
                break;
            }
            count++;
        }
        return count;
    }

    private static class InputValues {
        int N;
        int X;
        List<Integer> list = new ArrayList<Integer>();
    }
} Main public static void main(String[] args) {

        // 入力
        InputValues value = input(System.in);

        // 計算
        int result = calc(value);

        // 出力
        System.out.println(result);
    } main {

        // 入力
        InputValues value = input(System.in);

        // 計算
        int result = calc(value);

        // 出力
        System.out.println(result);
    } InputValues value = input(System.in); value input(System.in) input System.in System System.in int result = calc(value); result calc(value) calc value System.out.println(result) System.out.println System.out System System.out result String[] args args private static InputValues input(InputStream in) {
        InputValues inputs = new InputValues();

        try (Scanner sc = new Scanner(System.in)) {
            String[] input1 = sc.nextLine().split(" ");
            String[] input2 = sc.nextLine().split(" ");

            inputs.N = Integer.parseInt(input1[0]);
            inputs.X = Integer.parseInt(input1[1]);

            for (String str : input2) {
                inputs.list.add(Integer.parseInt(str));
            }
        }
        return inputs;
    } input {
        InputValues inputs = new InputValues();

        try (Scanner sc = new Scanner(System.in)) {
            String[] input1 = sc.nextLine().split(" ");
            String[] input2 = sc.nextLine().split(" ");

            inputs.N = Integer.parseInt(input1[0]);
            inputs.X = Integer.parseInt(input1[1]);

            for (String str : input2) {
                inputs.list.add(Integer.parseInt(str));
            }
        }
        return inputs;
    } InputValues inputs = new InputValues(); inputs new InputValues() try (Scanner sc = new Scanner(System.in)) {
            String[] input1 = sc.nextLine().split(" ");
            String[] input2 = sc.nextLine().split(" ");

            inputs.N = Integer.parseInt(input1[0]);
            inputs.X = Integer.parseInt(input1[1]);

            for (String str : input2) {
                inputs.list.add(Integer.parseInt(str));
            }
        } {
            String[] input1 = sc.nextLine().split(" ");
            String[] input2 = sc.nextLine().split(" ");

            inputs.N = Integer.parseInt(input1[0]);
            inputs.X = Integer.parseInt(input1[1]);

            for (String str : input2) {
                inputs.list.add(Integer.parseInt(str));
            }
        } Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) String[] input1 = sc.nextLine().split(" "); input1 sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " String[] input2 = sc.nextLine().split(" "); input2 sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " inputs.N = Integer.parseInt(input1[0]) inputs.N inputs inputs.N Integer.parseInt(input1[0]) Integer.parseInt Integer input1[0] input1 0 inputs.X = Integer.parseInt(input1[1]) inputs.X inputs inputs.X Integer.parseInt(input1[1]) Integer.parseInt Integer input1[1] input1 1 for (String str : input2) {
                inputs.list.add(Integer.parseInt(str));
            } String str input2 {
                inputs.list.add(Integer.parseInt(str));
            } {
                inputs.list.add(Integer.parseInt(str));
            } inputs.list.add(Integer.parseInt(str)) inputs.list.add inputs.list inputs inputs.list Integer.parseInt(str) Integer.parseInt Integer str return inputs; inputs InputStream in in private static int calc(InputValues inputs) {
        int ans = 0;
        int count = 1;
        for (int i = 0; i < inputs.N; i++) {
            ans = ans + inputs.list.get(i);
            if (inputs.X < ans) {
                break;
            }
            count++;
        }
        return count;
    } calc {
        int ans = 0;
        int count = 1;
        for (int i = 0; i < inputs.N; i++) {
            ans = ans + inputs.list.get(i);
            if (inputs.X < ans) {
                break;
            }
            count++;
        }
        return count;
    } int ans = 0; ans 0 int count = 1; count 1 for (int i = 0; i < inputs.N; i++) {
            ans = ans + inputs.list.get(i);
            if (inputs.X < ans) {
                break;
            }
            count++;
        } int i = 0; int i = 0; i 0 i < inputs.N i inputs.N inputs inputs.N i++ i++ i {
            ans = ans + inputs.list.get(i);
            if (inputs.X < ans) {
                break;
            }
            count++;
        } {
            ans = ans + inputs.list.get(i);
            if (inputs.X < ans) {
                break;
            }
            count++;
        } ans = ans + inputs.list.get(i) ans ans + inputs.list.get(i) ans inputs.list.get(i) inputs.list.get inputs.list inputs inputs.list i if (inputs.X < ans) {
                break;
            } inputs.X < ans inputs.X inputs inputs.X ans {
                break;
            } break; count++ count return count; count InputValues inputs inputs private static class InputValues {
        int N;
        int X;
        List<Integer> list = new ArrayList<Integer>();
    } InputValues int N; N int X; X List<Integer> list = new ArrayList<Integer>(); list new ArrayList<Integer>() public class Main {

    public static void main(String[] args) {

        // 入力
        InputValues value = input(System.in);

        // 計算
        int result = calc(value);

        // 出力
        System.out.println(result);
    }

    private static InputValues input(InputStream in) {
        InputValues inputs = new InputValues();

        try (Scanner sc = new Scanner(System.in)) {
            String[] input1 = sc.nextLine().split(" ");
            String[] input2 = sc.nextLine().split(" ");

            inputs.N = Integer.parseInt(input1[0]);
            inputs.X = Integer.parseInt(input1[1]);

            for (String str : input2) {
                inputs.list.add(Integer.parseInt(str));
            }
        }
        return inputs;
    }

    private static int calc(InputValues inputs) {
        int ans = 0;
        int count = 1;
        for (int i = 0; i < inputs.N; i++) {
            ans = ans + inputs.list.get(i);
            if (inputs.X < ans) {
                break;
            }
            count++;
        }
        return count;
    }

    private static class InputValues {
        int N;
        int X;
        List<Integer> list = new ArrayList<Integer>();
    }
} public class Main {

    public static void main(String[] args) {

        // 入力
        InputValues value = input(System.in);

        // 計算
        int result = calc(value);

        // 出力
        System.out.println(result);
    }

    private static InputValues input(InputStream in) {
        InputValues inputs = new InputValues();

        try (Scanner sc = new Scanner(System.in)) {
            String[] input1 = sc.nextLine().split(" ");
            String[] input2 = sc.nextLine().split(" ");

            inputs.N = Integer.parseInt(input1[0]);
            inputs.X = Integer.parseInt(input1[1]);

            for (String str : input2) {
                inputs.list.add(Integer.parseInt(str));
            }
        }
        return inputs;
    }

    private static int calc(InputValues inputs) {
        int ans = 0;
        int count = 1;
        for (int i = 0; i < inputs.N; i++) {
            ans = ans + inputs.list.get(i);
            if (inputs.X < ans) {
                break;
            }
            count++;
        }
        return count;
    }

    private static class InputValues {
        int N;
        int X;
        List<Integer> list = new ArrayList<Integer>();
    }
} Main
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

/**
 * AtCoder Beginner Contest 130<br>
 * B - Bounding<br>
 * <br>
 * https://atcoder.jp/contests/abc130/tasks/abc130_b<br>
 */
public class Main {

    public static void main(String[] args) {

        // 入力
        InputValues value = input(System.in);

        // 計算
        int result = calc(value);

        // 出力
        System.out.println(result);
    }

    private static InputValues input(InputStream in) {
        InputValues inputs = new InputValues();

        try (Scanner sc = new Scanner(System.in)) {
            String[] input1 = sc.nextLine().split(" ");
            String[] input2 = sc.nextLine().split(" ");

            inputs.N = Integer.parseInt(input1[0]);
            inputs.X = Integer.parseInt(input1[1]);

            for (String str : input2) {
                inputs.list.add(Integer.parseInt(str));
            }
        }
        return inputs;
    }

    private static int calc(InputValues inputs) {
        int ans = 0;
        int count = 1;
        for (int i = 0; i < inputs.N; i++) {
            ans = ans + inputs.list.get(i);
            if (inputs.X < ans) {
                break;
            }
            count++;
        }
        return count;
    }

    private static class InputValues {
        int N;
        int X;
        List<Integer> list = new ArrayList<Integer>();
    }
}
