import java.util.*;

public class Main {

    public static void main(String[] args) {
	    // write your code here
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int x = sc.nextInt();
        int ans = 1;
        int d = 0;

        for (int i = 2; i <= n + 1; i++) {
            int l = sc.nextInt();
            int value = d + l;
            if (value > x) {
                break;
            } else {
                ans++;
            }
            d = value;
        }
        System.out.println(ans);
    }
} import java.util.*; util.* java public class Main {

    public static void main(String[] args) {
	    // write your code here
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int x = sc.nextInt();
        int ans = 1;
        int d = 0;

        for (int i = 2; i <= n + 1; i++) {
            int l = sc.nextInt();
            int value = d + l;
            if (value > x) {
                break;
            } else {
                ans++;
            }
            d = value;
        }
        System.out.println(ans);
    }
} Main public static void main(String[] args) {
	    // write your code here
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int x = sc.nextInt();
        int ans = 1;
        int d = 0;

        for (int i = 2; i <= n + 1; i++) {
            int l = sc.nextInt();
            int value = d + l;
            if (value > x) {
                break;
            } else {
                ans++;
            }
            d = value;
        }
        System.out.println(ans);
    } main {
	    // write your code here
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int x = sc.nextInt();
        int ans = 1;
        int d = 0;

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

    public static void main(String[] args) {
	    // write your code here
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int x = sc.nextInt();
        int ans = 1;
        int d = 0;

        for (int i = 2; i <= n + 1; i++) {
            int l = sc.nextInt();
            int value = d + l;
            if (value > x) {
                break;
            } else {
                ans++;
            }
            d = value;
        }
        System.out.println(ans);
    }
} public class Main {

    public static void main(String[] args) {
	    // write your code here
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int x = sc.nextInt();
        int ans = 1;
        int d = 0;

        for (int i = 2; i <= n + 1; i++) {
            int l = sc.nextInt();
            int value = d + l;
            if (value > x) {
                break;
            } else {
                ans++;
            }
            d = value;
        }
        System.out.println(ans);
    }
} Main
import java.util.*;

public class Main {

    public static void main(String[] args) {
	    // write your code here
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int x = sc.nextInt();
        int ans = 1;
        int d = 0;

        for (int i = 2; i <= n + 1; i++) {
            int l = sc.nextInt();
            int value = d + l;
            if (value > x) {
                break;
            } else {
                ans++;
            }
            d = value;
        }
        System.out.println(ans);
    }
}