import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        // 整数の入力
        int n = sc.nextInt();
        int x = sc.nextInt();
        int res = 0,flag=1;
        int[] l= new int[n];
        for(int i=0;i<n;i++){
          l[i]=sc.nextInt();
          res+=l[i];
          if(res>x){
            break;
          }
          flag++;
        }
        System.out.println(flag);
    }

}

 import java.util.*; util.* java public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        // 整数の入力
        int n = sc.nextInt();
        int x = sc.nextInt();
        int res = 0,flag=1;
        int[] l= new int[n];
        for(int i=0;i<n;i++){
          l[i]=sc.nextInt();
          res+=l[i];
          if(res>x){
            break;
          }
          flag++;
        }
        System.out.println(flag);
    }

} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        // 整数の入力
        int n = sc.nextInt();
        int x = sc.nextInt();
        int res = 0,flag=1;
        int[] l= new int[n];
        for(int i=0;i<n;i++){
          l[i]=sc.nextInt();
          res+=l[i];
          if(res>x){
            break;
          }
          flag++;
        }
        System.out.println(flag);
    } main {
        Scanner sc = new Scanner(System.in);
        // 整数の入力
        int n = sc.nextInt();
        int x = sc.nextInt();
        int res = 0,flag=1;
        int[] l= new int[n];
        for(int i=0;i<n;i++){
          l[i]=sc.nextInt();
          res+=l[i];
          if(res>x){
            break;
          }
          flag++;
        }
        System.out.println(flag);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int x = sc.nextInt(); x sc.nextInt() sc.nextInt sc int res = 0 res 0 flag=1; flag 1 int[] l= new int[n]; l new int[n] n for(int i=0;i<n;i++){
          l[i]=sc.nextInt();
          res+=l[i];
          if(res>x){
            break;
          }
          flag++;
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
          l[i]=sc.nextInt();
          res+=l[i];
          if(res>x){
            break;
          }
          flag++;
        } {
          l[i]=sc.nextInt();
          res+=l[i];
          if(res>x){
            break;
          }
          flag++;
        } l[i]=sc.nextInt() l[i] l i sc.nextInt() sc.nextInt sc res+=l[i] res l[i] l i if(res>x){
            break;
          } res>x res x {
            break;
          } break; flag++ flag System.out.println(flag) System.out.println System.out System System.out flag String[] args args public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        // 整数の入力
        int n = sc.nextInt();
        int x = sc.nextInt();
        int res = 0,flag=1;
        int[] l= new int[n];
        for(int i=0;i<n;i++){
          l[i]=sc.nextInt();
          res+=l[i];
          if(res>x){
            break;
          }
          flag++;
        }
        System.out.println(flag);
    }

} public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        // 整数の入力
        int n = sc.nextInt();
        int x = sc.nextInt();
        int res = 0,flag=1;
        int[] l= new int[n];
        for(int i=0;i<n;i++){
          l[i]=sc.nextInt();
          res+=l[i];
          if(res>x){
            break;
          }
          flag++;
        }
        System.out.println(flag);
    }

} Main
import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        // 整数の入力
        int n = sc.nextInt();
        int x = sc.nextInt();
        int res = 0,flag=1;
        int[] l= new int[n];
        for(int i=0;i<n;i++){
          l[i]=sc.nextInt();
          res+=l[i];
          if(res>x){
            break;
          }
          flag++;
        }
        System.out.println(flag);
    }

}


