import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] s1 = sc.nextLine().split(" ");
        String[] l = sc.nextLine().split(" ");

        int n = Integer.parseInt(s1[0]);
        int x = Integer.parseInt(s1[1]);

        int result=1;
        int sum=0;
        for (int i = 0; i < n;i++) {
        	sum=sum+Integer.parseInt(l[i]);
        	if (sum <= x) {
        		result++;
        	} else {
        		break;
        	}
        }

        System.out.println(result);
    }



} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] s1 = sc.nextLine().split(" ");
        String[] l = sc.nextLine().split(" ");

        int n = Integer.parseInt(s1[0]);
        int x = Integer.parseInt(s1[1]);

        int result=1;
        int sum=0;
        for (int i = 0; i < n;i++) {
        	sum=sum+Integer.parseInt(l[i]);
        	if (sum <= x) {
        		result++;
        	} else {
        		break;
        	}
        }

        System.out.println(result);
    }



} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] s1 = sc.nextLine().split(" ");
        String[] l = sc.nextLine().split(" ");

        int n = Integer.parseInt(s1[0]);
        int x = Integer.parseInt(s1[1]);

        int result=1;
        int sum=0;
        for (int i = 0; i < n;i++) {
        	sum=sum+Integer.parseInt(l[i]);
        	if (sum <= x) {
        		result++;
        	} else {
        		break;
        	}
        }

        System.out.println(result);
    } main {
        Scanner sc = new Scanner(System.in);
        String[] s1 = sc.nextLine().split(" ");
        String[] l = sc.nextLine().split(" ");

        int n = Integer.parseInt(s1[0]);
        int x = Integer.parseInt(s1[1]);

        int result=1;
        int sum=0;
        for (int i = 0; i < n;i++) {
        	sum=sum+Integer.parseInt(l[i]);
        	if (sum <= x) {
        		result++;
        	} else {
        		break;
        	}
        }

        System.out.println(result);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String[] s1 = sc.nextLine().split(" "); s1 sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " String[] l = sc.nextLine().split(" "); l sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " int n = Integer.parseInt(s1[0]); n Integer.parseInt(s1[0]) Integer.parseInt Integer s1[0] s1 0 int x = Integer.parseInt(s1[1]); x Integer.parseInt(s1[1]) Integer.parseInt Integer s1[1] s1 1 int result=1; result 1 int sum=0; sum 0 for (int i = 0; i < n;i++) {
        	sum=sum+Integer.parseInt(l[i]);
        	if (sum <= x) {
        		result++;
        	} else {
        		break;
        	}
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
        	sum=sum+Integer.parseInt(l[i]);
        	if (sum <= x) {
        		result++;
        	} else {
        		break;
        	}
        } {
        	sum=sum+Integer.parseInt(l[i]);
        	if (sum <= x) {
        		result++;
        	} else {
        		break;
        	}
        } sum=sum+Integer.parseInt(l[i]) sum sum+Integer.parseInt(l[i]) sum Integer.parseInt(l[i]) Integer.parseInt Integer l[i] l i if (sum <= x) {
        		result++;
        	} else {
        		break;
        	} sum <= x sum x {
        		result++;
        	} result++ result {
        		break;
        	} break; System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] s1 = sc.nextLine().split(" ");
        String[] l = sc.nextLine().split(" ");

        int n = Integer.parseInt(s1[0]);
        int x = Integer.parseInt(s1[1]);

        int result=1;
        int sum=0;
        for (int i = 0; i < n;i++) {
        	sum=sum+Integer.parseInt(l[i]);
        	if (sum <= x) {
        		result++;
        	} else {
        		break;
        	}
        }

        System.out.println(result);
    }



} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] s1 = sc.nextLine().split(" ");
        String[] l = sc.nextLine().split(" ");

        int n = Integer.parseInt(s1[0]);
        int x = Integer.parseInt(s1[1]);

        int result=1;
        int sum=0;
        for (int i = 0; i < n;i++) {
        	sum=sum+Integer.parseInt(l[i]);
        	if (sum <= x) {
        		result++;
        	} else {
        		break;
        	}
        }

        System.out.println(result);
    }



} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] s1 = sc.nextLine().split(" ");
        String[] l = sc.nextLine().split(" ");

        int n = Integer.parseInt(s1[0]);
        int x = Integer.parseInt(s1[1]);

        int result=1;
        int sum=0;
        for (int i = 0; i < n;i++) {
        	sum=sum+Integer.parseInt(l[i]);
        	if (sum <= x) {
        		result++;
        	} else {
        		break;
        	}
        }

        System.out.println(result);
    }



}