import 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 pos = 0;
        for (int i = 0; i < n; ++i) {
            pos += sc.nextInt();
            if (pos > x) {
                System.out.println(i + 1);
                return;
            }
        }
        System.out.println(n + 1);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int x = sc.nextInt();

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

        int pos = 0;
        for (int i = 0; i < n; ++i) {
            pos += sc.nextInt();
            if (pos > x) {
                System.out.println(i + 1);
                return;
            }
        }
        System.out.println(n + 1);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int x = sc.nextInt();

        int pos = 0;
        for (int i = 0; i < n; ++i) {
            pos += sc.nextInt();
            if (pos > x) {
                System.out.println(i + 1);
                return;
            }
        }
        System.out.println(n + 1);
    } 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 pos = 0; pos 0 for (int i = 0; i < n; ++i) {
            pos += sc.nextInt();
            if (pos > x) {
                System.out.println(i + 1);
                return;
            }
        } int i = 0; int i = 0; i 0 i < n i n ++i ++i i {
            pos += sc.nextInt();
            if (pos > x) {
                System.out.println(i + 1);
                return;
            }
        } {
            pos += sc.nextInt();
            if (pos > x) {
                System.out.println(i + 1);
                return;
            }
        } pos += sc.nextInt() pos sc.nextInt() sc.nextInt sc if (pos > x) {
                System.out.println(i + 1);
                return;
            } pos > x pos x {
                System.out.println(i + 1);
                return;
            } System.out.println(i + 1) System.out.println System.out System System.out i + 1 i 1 return; System.out.println(n + 1) System.out.println System.out System System.out n + 1 n 1 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 pos = 0;
        for (int i = 0; i < n; ++i) {
            pos += sc.nextInt();
            if (pos > x) {
                System.out.println(i + 1);
                return;
            }
        }
        System.out.println(n + 1);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int x = sc.nextInt();

        int pos = 0;
        for (int i = 0; i < n; ++i) {
            pos += sc.nextInt();
            if (pos > x) {
                System.out.println(i + 1);
                return;
            }
        }
        System.out.println(n + 1);
    }
} Main
import 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 pos = 0;
        for (int i = 0; i < n; ++i) {
            pos += sc.nextInt();
            if (pos > x) {
                System.out.println(i + 1);
                return;
            }
        }
        System.out.println(n + 1);
    }
}