import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        solve();
    }

    private static void solve() {
        Scanner input = new Scanner(System.in);

        int n = input.nextInt();
        int x = input.nextInt();

        int cnt = 1;
        int lsum = 0;

        for (int i = 0; i < n; i++) {
        	int l = input.nextInt();
        	lsum += l;
        	if (lsum <= x) {
        		cnt++;
        	}
        }

        System.out.println(cnt);

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

    public static void main(String[] args) {
        solve();
    }

    private static void solve() {
        Scanner input = new Scanner(System.in);

        int n = input.nextInt();
        int x = input.nextInt();

        int cnt = 1;
        int lsum = 0;

        for (int i = 0; i < n; i++) {
        	int l = input.nextInt();
        	lsum += l;
        	if (lsum <= x) {
        		cnt++;
        	}
        }

        System.out.println(cnt);

    }
} Main public static void main(String[] args) {
        solve();
    } main {
        solve();
    } solve() solve String[] args args private static void solve() {
        Scanner input = new Scanner(System.in);

        int n = input.nextInt();
        int x = input.nextInt();

        int cnt = 1;
        int lsum = 0;

        for (int i = 0; i < n; i++) {
        	int l = input.nextInt();
        	lsum += l;
        	if (lsum <= x) {
        		cnt++;
        	}
        }

        System.out.println(cnt);

    } solve {
        Scanner input = new Scanner(System.in);

        int n = input.nextInt();
        int x = input.nextInt();

        int cnt = 1;
        int lsum = 0;

        for (int i = 0; i < n; i++) {
        	int l = input.nextInt();
        	lsum += l;
        	if (lsum <= x) {
        		cnt++;
        	}
        }

        System.out.println(cnt);

    } Scanner input = new Scanner(System.in); input new Scanner(System.in) int n = input.nextInt(); n input.nextInt() input.nextInt input int x = input.nextInt(); x input.nextInt() input.nextInt input int cnt = 1; cnt 1 int lsum = 0; lsum 0 for (int i = 0; i < n; i++) {
        	int l = input.nextInt();
        	lsum += l;
        	if (lsum <= x) {
        		cnt++;
        	}
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
        	int l = input.nextInt();
        	lsum += l;
        	if (lsum <= x) {
        		cnt++;
        	}
        } {
        	int l = input.nextInt();
        	lsum += l;
        	if (lsum <= x) {
        		cnt++;
        	}
        } int l = input.nextInt(); l input.nextInt() input.nextInt input lsum += l lsum l if (lsum <= x) {
        		cnt++;
        	} lsum <= x lsum x {
        		cnt++;
        	} cnt++ cnt System.out.println(cnt) System.out.println System.out System System.out cnt public class Main {

    public static void main(String[] args) {
        solve();
    }

    private static void solve() {
        Scanner input = new Scanner(System.in);

        int n = input.nextInt();
        int x = input.nextInt();

        int cnt = 1;
        int lsum = 0;

        for (int i = 0; i < n; i++) {
        	int l = input.nextInt();
        	lsum += l;
        	if (lsum <= x) {
        		cnt++;
        	}
        }

        System.out.println(cnt);

    }
} public class Main {

    public static void main(String[] args) {
        solve();
    }

    private static void solve() {
        Scanner input = new Scanner(System.in);

        int n = input.nextInt();
        int x = input.nextInt();

        int cnt = 1;
        int lsum = 0;

        for (int i = 0; i < n; i++) {
        	int l = input.nextInt();
        	lsum += l;
        	if (lsum <= x) {
        		cnt++;
        	}
        }

        System.out.println(cnt);

    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        solve();
    }

    private static void solve() {
        Scanner input = new Scanner(System.in);

        int n = input.nextInt();
        int x = input.nextInt();

        int cnt = 1;
        int lsum = 0;

        for (int i = 0; i < n; i++) {
        	int l = input.nextInt();
        	lsum += l;
        	if (lsum <= x) {
        		cnt++;
        	}
        }

        System.out.println(cnt);

    }
}
