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 bndresult = 0;
    int cnt = 0;
    
    ArrayList<Integer> bndList = new ArrayList<Integer>();
    
    for(int i = 0; i<=n; i++){
      	if(i != 0){
        int l = sc.nextInt();
      	bndresult = bndresult + l;
        }
      	bndList.add(bndresult);
    }
    
    for (int i=0; i<bndList.size(); ++i){
      int z = bndList.get(i);
      if(z <= x){
        cnt++;
      }
    }
    System.out.println(cnt);  
  }
 } 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 bndresult = 0;
    int cnt = 0;
    
    ArrayList<Integer> bndList = new ArrayList<Integer>();
    
    for(int i = 0; i<=n; i++){
      	if(i != 0){
        int l = sc.nextInt();
      	bndresult = bndresult + l;
        }
      	bndList.add(bndresult);
    }
    
    for (int i=0; i<bndList.size(); ++i){
      int z = bndList.get(i);
      if(z <= x){
        cnt++;
      }
    }
    System.out.println(cnt);  
  }
 } Main public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int x = sc.nextInt();
    int bndresult = 0;
    int cnt = 0;
    
    ArrayList<Integer> bndList = new ArrayList<Integer>();
    
    for(int i = 0; i<=n; i++){
      	if(i != 0){
        int l = sc.nextInt();
      	bndresult = bndresult + l;
        }
      	bndList.add(bndresult);
    }
    
    for (int i=0; i<bndList.size(); ++i){
      int z = bndList.get(i);
      if(z <= x){
        cnt++;
      }
    }
    System.out.println(cnt);  
  } main {
   Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int x = sc.nextInt();
    int bndresult = 0;
    int cnt = 0;
    
    ArrayList<Integer> bndList = new ArrayList<Integer>();
    
    for(int i = 0; i<=n; i++){
      	if(i != 0){
        int l = sc.nextInt();
      	bndresult = bndresult + l;
        }
      	bndList.add(bndresult);
    }
    
    for (int i=0; i<bndList.size(); ++i){
      int z = bndList.get(i);
      if(z <= x){
        cnt++;
      }
    }
    System.out.println(cnt);  
  } 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 bndresult = 0; bndresult 0 int cnt = 0; cnt 0 ArrayList<Integer> bndList = new ArrayList<Integer>(); bndList new ArrayList<Integer>() for(int i = 0; i<=n; i++){
      	if(i != 0){
        int l = sc.nextInt();
      	bndresult = bndresult + l;
        }
      	bndList.add(bndresult);
    } int i = 0; int i = 0; i 0 i<=n i n i++ i++ i {
      	if(i != 0){
        int l = sc.nextInt();
      	bndresult = bndresult + l;
        }
      	bndList.add(bndresult);
    } {
      	if(i != 0){
        int l = sc.nextInt();
      	bndresult = bndresult + l;
        }
      	bndList.add(bndresult);
    } if(i != 0){
        int l = sc.nextInt();
      	bndresult = bndresult + l;
        } i != 0 i 0 {
        int l = sc.nextInt();
      	bndresult = bndresult + l;
        } int l = sc.nextInt(); l sc.nextInt() sc.nextInt sc bndresult = bndresult + l bndresult bndresult + l bndresult l bndList.add(bndresult) bndList.add bndList bndresult for (int i=0; i<bndList.size(); ++i){
      int z = bndList.get(i);
      if(z <= x){
        cnt++;
      }
    } int i=0; int i=0; i 0 i<bndList.size() i bndList.size() bndList.size bndList ++i ++i i {
      int z = bndList.get(i);
      if(z <= x){
        cnt++;
      }
    } {
      int z = bndList.get(i);
      if(z <= x){
        cnt++;
      }
    } int z = bndList.get(i); z bndList.get(i) bndList.get bndList i if(z <= x){
        cnt++;
      } z <= x z x {
        cnt++;
      } cnt++ cnt System.out.println(cnt) System.out.println System.out System System.out cnt 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 bndresult = 0;
    int cnt = 0;
    
    ArrayList<Integer> bndList = new ArrayList<Integer>();
    
    for(int i = 0; i<=n; i++){
      	if(i != 0){
        int l = sc.nextInt();
      	bndresult = bndresult + l;
        }
      	bndList.add(bndresult);
    }
    
    for (int i=0; i<bndList.size(); ++i){
      int z = bndList.get(i);
      if(z <= x){
        cnt++;
      }
    }
    System.out.println(cnt);  
  }
 } public class Main{
  public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int x = sc.nextInt();
    int bndresult = 0;
    int cnt = 0;
    
    ArrayList<Integer> bndList = new ArrayList<Integer>();
    
    for(int i = 0; i<=n; i++){
      	if(i != 0){
        int l = sc.nextInt();
      	bndresult = bndresult + l;
        }
      	bndList.add(bndresult);
    }
    
    for (int i=0; i<bndList.size(); ++i){
      int z = bndList.get(i);
      if(z <= x){
        cnt++;
      }
    }
    System.out.println(cnt);  
  }
 } 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 bndresult = 0;
    int cnt = 0;
    
    ArrayList<Integer> bndList = new ArrayList<Integer>();
    
    for(int i = 0; i<=n; i++){
      	if(i != 0){
        int l = sc.nextInt();
      	bndresult = bndresult + l;
        }
      	bndList.add(bndresult);
    }
    
    for (int i=0; i<bndList.size(); ++i){
      int z = bndList.get(i);
      if(z <= x){
        cnt++;
      }
    }
    System.out.println(cnt);  
  }
 }
