import java.util.*;

public class Main {

    public static void main(String[] args) {

        Scanner parameter = new Scanner(System.in);

        Integer count = 1;

        String[] input1 = parameter.nextLine().split(" ");
        String[] input2 = parameter.nextLine().split(" ");

        String limit = input1[1];

        Integer total = 0;

        for (int i = 0; i < input2.length; i++) {

        	total = total + Integer.valueOf(input2[i]);

        	if (total <= Integer.valueOf(limit)) {

        		count = count + 1;
        	} else {

        		break;
        	}
        }

        System.out.println(count);
    }
} import java.util.*; util.* java public class Main {

    public static void main(String[] args) {

        Scanner parameter = new Scanner(System.in);

        Integer count = 1;

        String[] input1 = parameter.nextLine().split(" ");
        String[] input2 = parameter.nextLine().split(" ");

        String limit = input1[1];

        Integer total = 0;

        for (int i = 0; i < input2.length; i++) {

        	total = total + Integer.valueOf(input2[i]);

        	if (total <= Integer.valueOf(limit)) {

        		count = count + 1;
        	} else {

        		break;
        	}
        }

        System.out.println(count);
    }
} Main public static void main(String[] args) {

        Scanner parameter = new Scanner(System.in);

        Integer count = 1;

        String[] input1 = parameter.nextLine().split(" ");
        String[] input2 = parameter.nextLine().split(" ");

        String limit = input1[1];

        Integer total = 0;

        for (int i = 0; i < input2.length; i++) {

        	total = total + Integer.valueOf(input2[i]);

        	if (total <= Integer.valueOf(limit)) {

        		count = count + 1;
        	} else {

        		break;
        	}
        }

        System.out.println(count);
    } main {

        Scanner parameter = new Scanner(System.in);

        Integer count = 1;

        String[] input1 = parameter.nextLine().split(" ");
        String[] input2 = parameter.nextLine().split(" ");

        String limit = input1[1];

        Integer total = 0;

        for (int i = 0; i < input2.length; i++) {

        	total = total + Integer.valueOf(input2[i]);

        	if (total <= Integer.valueOf(limit)) {

        		count = count + 1;
        	} else {

        		break;
        	}
        }

        System.out.println(count);
    } Scanner parameter = new Scanner(System.in); parameter new Scanner(System.in) Integer count = 1; count 1 String[] input1 = parameter.nextLine().split(" "); input1 parameter.nextLine().split(" ") parameter.nextLine().split parameter.nextLine() parameter.nextLine parameter " " String[] input2 = parameter.nextLine().split(" "); input2 parameter.nextLine().split(" ") parameter.nextLine().split parameter.nextLine() parameter.nextLine parameter " " String limit = input1[1]; limit input1[1] input1 1 Integer total = 0; total 0 for (int i = 0; i < input2.length; i++) {

        	total = total + Integer.valueOf(input2[i]);

        	if (total <= Integer.valueOf(limit)) {

        		count = count + 1;
        	} else {

        		break;
        	}
        } int i = 0; int i = 0; i 0 i < input2.length i input2.length input2 input2.length i++ i++ i {

        	total = total + Integer.valueOf(input2[i]);

        	if (total <= Integer.valueOf(limit)) {

        		count = count + 1;
        	} else {

        		break;
        	}
        } {

        	total = total + Integer.valueOf(input2[i]);

        	if (total <= Integer.valueOf(limit)) {

        		count = count + 1;
        	} else {

        		break;
        	}
        } total = total + Integer.valueOf(input2[i]) total total + Integer.valueOf(input2[i]) total Integer.valueOf(input2[i]) Integer.valueOf Integer input2[i] input2 i if (total <= Integer.valueOf(limit)) {

        		count = count + 1;
        	} else {

        		break;
        	} total <= Integer.valueOf(limit) total Integer.valueOf(limit) Integer.valueOf Integer limit {

        		count = count + 1;
        	} count = count + 1 count count + 1 count 1 {

        		break;
        	} break; System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {

    public static void main(String[] args) {

        Scanner parameter = new Scanner(System.in);

        Integer count = 1;

        String[] input1 = parameter.nextLine().split(" ");
        String[] input2 = parameter.nextLine().split(" ");

        String limit = input1[1];

        Integer total = 0;

        for (int i = 0; i < input2.length; i++) {

        	total = total + Integer.valueOf(input2[i]);

        	if (total <= Integer.valueOf(limit)) {

        		count = count + 1;
        	} else {

        		break;
        	}
        }

        System.out.println(count);
    }
} public class Main {

    public static void main(String[] args) {

        Scanner parameter = new Scanner(System.in);

        Integer count = 1;

        String[] input1 = parameter.nextLine().split(" ");
        String[] input2 = parameter.nextLine().split(" ");

        String limit = input1[1];

        Integer total = 0;

        for (int i = 0; i < input2.length; i++) {

        	total = total + Integer.valueOf(input2[i]);

        	if (total <= Integer.valueOf(limit)) {

        		count = count + 1;
        	} else {

        		break;
        	}
        }

        System.out.println(count);
    }
} Main
import java.util.*;

public class Main {

    public static void main(String[] args) {

        Scanner parameter = new Scanner(System.in);

        Integer count = 1;

        String[] input1 = parameter.nextLine().split(" ");
        String[] input2 = parameter.nextLine().split(" ");

        String limit = input1[1];

        Integer total = 0;

        for (int i = 0; i < input2.length; i++) {

        	total = total + Integer.valueOf(input2[i]);

        	if (total <= Integer.valueOf(limit)) {

        		count = count + 1;
        	} else {

        		break;
        	}
        }

        System.out.println(count);
    }
}
