import java.util.Scanner;

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

        int d = 0;
        int cnt = 0;
        if(d <= x) cnt++;
        for (int i = 0; i < n; i++) {
            d += scanner.nextInt();
            if(d <= x){
                cnt++;
            }
//            int l = scanner.nextInt();

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

        int d = 0;
        int cnt = 0;
        if(d <= x) cnt++;
        for (int i = 0; i < n; i++) {
            d += scanner.nextInt();
            if(d <= x){
                cnt++;
            }
//            int l = scanner.nextInt();

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

        int d = 0;
        int cnt = 0;
        if(d <= x) cnt++;
        for (int i = 0; i < n; i++) {
            d += scanner.nextInt();
            if(d <= x){
                cnt++;
            }
//            int l = scanner.nextInt();

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

        int d = 0;
        int cnt = 0;
        if(d <= x) cnt++;
        for (int i = 0; i < n; i++) {
            d += scanner.nextInt();
            if(d <= x){
                cnt++;
            }
//            int l = scanner.nextInt();

        }
        System.out.println(cnt);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner int x = scanner.nextInt(); x scanner.nextInt() scanner.nextInt scanner int d = 0; d 0 int cnt = 0; cnt 0 if(d <= x) cnt++; d <= x d x cnt++ cnt for (int i = 0; i < n; i++) {
            d += scanner.nextInt();
            if(d <= x){
                cnt++;
            }
//            int l = scanner.nextInt();

        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            d += scanner.nextInt();
            if(d <= x){
                cnt++;
            }
//            int l = scanner.nextInt();

        } {
            d += scanner.nextInt();
            if(d <= x){
                cnt++;
            }
//            int l = scanner.nextInt();

        } d += scanner.nextInt() d scanner.nextInt() scanner.nextInt scanner if(d <= x){
                cnt++;
            } d <= x d x {
                cnt++;
            } cnt++ cnt System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int x = scanner.nextInt();

        int d = 0;
        int cnt = 0;
        if(d <= x) cnt++;
        for (int i = 0; i < n; i++) {
            d += scanner.nextInt();
            if(d <= x){
                cnt++;
            }
//            int l = scanner.nextInt();

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

        int d = 0;
        int cnt = 0;
        if(d <= x) cnt++;
        for (int i = 0; i < n; i++) {
            d += scanner.nextInt();
            if(d <= x){
                cnt++;
            }
//            int l = scanner.nextInt();

        }
        System.out.println(cnt);
    }
} Main
import java.util.Scanner;

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

        int d = 0;
        int cnt = 0;
        if(d <= x) cnt++;
        for (int i = 0; i < n; i++) {
            d += scanner.nextInt();
            if(d <= x){
                cnt++;
            }
//            int l = scanner.nextInt();

        }
        System.out.println(cnt);
    }
}
