import java.util.*;
public class Main{
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = Integer.parseInt(scan.next());
        int[] lst = new int[n+1];
        int x = Integer.parseInt(scan.next());
        for(int a = 0; a <= n; a++){
            if(a == 0){
                lst[0] = 0;
            }
            else{
                lst[a] = Integer.parseInt(scan.next());
            }
        }
        for (int a = 0; a <= n; a++) {
            if(a!=n) {
                lst[a + 1] = lst[a] + lst[a + 1];
            }
            else if(a == n){
                System.out.println(n+1);
                break;
            }
            if (lst[a + 1] > x){
                System.out.println(a + 1);
                break;
            }
        }
    }
}
 import java.util.*; util.* java public class Main{
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = Integer.parseInt(scan.next());
        int[] lst = new int[n+1];
        int x = Integer.parseInt(scan.next());
        for(int a = 0; a <= n; a++){
            if(a == 0){
                lst[0] = 0;
            }
            else{
                lst[a] = Integer.parseInt(scan.next());
            }
        }
        for (int a = 0; a <= n; a++) {
            if(a!=n) {
                lst[a + 1] = lst[a] + lst[a + 1];
            }
            else if(a == n){
                System.out.println(n+1);
                break;
            }
            if (lst[a + 1] > x){
                System.out.println(a + 1);
                break;
            }
        }
    }
} Main public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = Integer.parseInt(scan.next());
        int[] lst = new int[n+1];
        int x = Integer.parseInt(scan.next());
        for(int a = 0; a <= n; a++){
            if(a == 0){
                lst[0] = 0;
            }
            else{
                lst[a] = Integer.parseInt(scan.next());
            }
        }
        for (int a = 0; a <= n; a++) {
            if(a!=n) {
                lst[a + 1] = lst[a] + lst[a + 1];
            }
            else if(a == n){
                System.out.println(n+1);
                break;
            }
            if (lst[a + 1] > x){
                System.out.println(a + 1);
                break;
            }
        }
    } main {
        Scanner scan = new Scanner(System.in);
        int n = Integer.parseInt(scan.next());
        int[] lst = new int[n+1];
        int x = Integer.parseInt(scan.next());
        for(int a = 0; a <= n; a++){
            if(a == 0){
                lst[0] = 0;
            }
            else{
                lst[a] = Integer.parseInt(scan.next());
            }
        }
        for (int a = 0; a <= n; a++) {
            if(a!=n) {
                lst[a + 1] = lst[a] + lst[a + 1];
            }
            else if(a == n){
                System.out.println(n+1);
                break;
            }
            if (lst[a + 1] > x){
                System.out.println(a + 1);
                break;
            }
        }
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = Integer.parseInt(scan.next()); n Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan int[] lst = new int[n+1]; lst new int[n+1] n+1 n 1 int x = Integer.parseInt(scan.next()); x Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan for(int a = 0; a <= n; a++){
            if(a == 0){
                lst[0] = 0;
            }
            else{
                lst[a] = Integer.parseInt(scan.next());
            }
        } int a = 0; int a = 0; a 0 a <= n a n a++ a++ a {
            if(a == 0){
                lst[0] = 0;
            }
            else{
                lst[a] = Integer.parseInt(scan.next());
            }
        } {
            if(a == 0){
                lst[0] = 0;
            }
            else{
                lst[a] = Integer.parseInt(scan.next());
            }
        } if(a == 0){
                lst[0] = 0;
            }
            else{
                lst[a] = Integer.parseInt(scan.next());
            } a == 0 a 0 {
                lst[0] = 0;
            } lst[0] = 0 lst[0] lst 0 0 {
                lst[a] = Integer.parseInt(scan.next());
            } lst[a] = Integer.parseInt(scan.next()) lst[a] lst a Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan for (int a = 0; a <= n; a++) {
            if(a!=n) {
                lst[a + 1] = lst[a] + lst[a + 1];
            }
            else if(a == n){
                System.out.println(n+1);
                break;
            }
            if (lst[a + 1] > x){
                System.out.println(a + 1);
                break;
            }
        } int a = 0; int a = 0; a 0 a <= n a n a++ a++ a {
            if(a!=n) {
                lst[a + 1] = lst[a] + lst[a + 1];
            }
            else if(a == n){
                System.out.println(n+1);
                break;
            }
            if (lst[a + 1] > x){
                System.out.println(a + 1);
                break;
            }
        } {
            if(a!=n) {
                lst[a + 1] = lst[a] + lst[a + 1];
            }
            else if(a == n){
                System.out.println(n+1);
                break;
            }
            if (lst[a + 1] > x){
                System.out.println(a + 1);
                break;
            }
        } if(a!=n) {
                lst[a + 1] = lst[a] + lst[a + 1];
            }
            else if(a == n){
                System.out.println(n+1);
                break;
            } a!=n a n {
                lst[a + 1] = lst[a] + lst[a + 1];
            } lst[a + 1] = lst[a] + lst[a + 1] lst[a + 1] lst a + 1 a 1 lst[a] + lst[a + 1] lst[a] lst a lst[a + 1] lst a + 1 a 1 if(a == n){
                System.out.println(n+1);
                break;
            } a == n a n {
                System.out.println(n+1);
                break;
            } System.out.println(n+1) System.out.println System.out System System.out n+1 n 1 break; if (lst[a + 1] > x){
                System.out.println(a + 1);
                break;
            } lst[a + 1] > x lst[a + 1] lst a + 1 a 1 x {
                System.out.println(a + 1);
                break;
            } System.out.println(a + 1) System.out.println System.out System System.out a + 1 a 1 break; String[] args args public class Main{
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = Integer.parseInt(scan.next());
        int[] lst = new int[n+1];
        int x = Integer.parseInt(scan.next());
        for(int a = 0; a <= n; a++){
            if(a == 0){
                lst[0] = 0;
            }
            else{
                lst[a] = Integer.parseInt(scan.next());
            }
        }
        for (int a = 0; a <= n; a++) {
            if(a!=n) {
                lst[a + 1] = lst[a] + lst[a + 1];
            }
            else if(a == n){
                System.out.println(n+1);
                break;
            }
            if (lst[a + 1] > x){
                System.out.println(a + 1);
                break;
            }
        }
    }
} public class Main{
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = Integer.parseInt(scan.next());
        int[] lst = new int[n+1];
        int x = Integer.parseInt(scan.next());
        for(int a = 0; a <= n; a++){
            if(a == 0){
                lst[0] = 0;
            }
            else{
                lst[a] = Integer.parseInt(scan.next());
            }
        }
        for (int a = 0; a <= n; a++) {
            if(a!=n) {
                lst[a + 1] = lst[a] + lst[a + 1];
            }
            else if(a == n){
                System.out.println(n+1);
                break;
            }
            if (lst[a + 1] > x){
                System.out.println(a + 1);
                break;
            }
        }
    }
} Main
import java.util.*;
public class Main{
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = Integer.parseInt(scan.next());
        int[] lst = new int[n+1];
        int x = Integer.parseInt(scan.next());
        for(int a = 0; a <= n; a++){
            if(a == 0){
                lst[0] = 0;
            }
            else{
                lst[a] = Integer.parseInt(scan.next());
            }
        }
        for (int a = 0; a <= n; a++) {
            if(a!=n) {
                lst[a + 1] = lst[a] + lst[a + 1];
            }
            else if(a == n){
                System.out.println(n+1);
                break;
            }
            if (lst[a + 1] > x){
                System.out.println(a + 1);
                break;
            }
        }
    }
}

