import java.util.Scanner;
 
public class Main{
  public static void main(String[] args){
	Scanner in=new Scanner(System.in);
    int N=in.nextInt();
    int X=in.nextInt();
    int D[]=new int[N+1];
    int L[]=new int[N];
    for(int i=0;i<N;i++){
    	L[i]=in.nextInt();
    }
    int count=1;
    for(int i=1;i<N+1;i++){
    	D[i]=D[i-1]+L[i-1];
      	if(D[i]<=X)
          count++;
      	else
          break;
    }
    System.out.println(count);
    in.close();
  }
} import java.util.Scanner; Scanner java.util public class Main{
  public static void main(String[] args){
	Scanner in=new Scanner(System.in);
    int N=in.nextInt();
    int X=in.nextInt();
    int D[]=new int[N+1];
    int L[]=new int[N];
    for(int i=0;i<N;i++){
    	L[i]=in.nextInt();
    }
    int count=1;
    for(int i=1;i<N+1;i++){
    	D[i]=D[i-1]+L[i-1];
      	if(D[i]<=X)
          count++;
      	else
          break;
    }
    System.out.println(count);
    in.close();
  }
} Main public static void main(String[] args){
	Scanner in=new Scanner(System.in);
    int N=in.nextInt();
    int X=in.nextInt();
    int D[]=new int[N+1];
    int L[]=new int[N];
    for(int i=0;i<N;i++){
    	L[i]=in.nextInt();
    }
    int count=1;
    for(int i=1;i<N+1;i++){
    	D[i]=D[i-1]+L[i-1];
      	if(D[i]<=X)
          count++;
      	else
          break;
    }
    System.out.println(count);
    in.close();
  } main {
	Scanner in=new Scanner(System.in);
    int N=in.nextInt();
    int X=in.nextInt();
    int D[]=new int[N+1];
    int L[]=new int[N];
    for(int i=0;i<N;i++){
    	L[i]=in.nextInt();
    }
    int count=1;
    for(int i=1;i<N+1;i++){
    	D[i]=D[i-1]+L[i-1];
      	if(D[i]<=X)
          count++;
      	else
          break;
    }
    System.out.println(count);
    in.close();
  } Scanner in=new Scanner(System.in); in new Scanner(System.in) int N=in.nextInt(); N in.nextInt() in.nextInt in int X=in.nextInt(); X in.nextInt() in.nextInt in int D[]=new int[N+1]; D new int[N+1] N+1 N 1 int L[]=new int[N]; L new int[N] N for(int i=0;i<N;i++){
    	L[i]=in.nextInt();
    } int i=0; int i=0; i 0 i<N i N i++ i++ i {
    	L[i]=in.nextInt();
    } {
    	L[i]=in.nextInt();
    } L[i]=in.nextInt() L[i] L i in.nextInt() in.nextInt in int count=1; count 1 for(int i=1;i<N+1;i++){
    	D[i]=D[i-1]+L[i-1];
      	if(D[i]<=X)
          count++;
      	else
          break;
    } int i=1; int i=1; i 1 i<N+1 i N+1 N 1 i++ i++ i {
    	D[i]=D[i-1]+L[i-1];
      	if(D[i]<=X)
          count++;
      	else
          break;
    } {
    	D[i]=D[i-1]+L[i-1];
      	if(D[i]<=X)
          count++;
      	else
          break;
    } D[i]=D[i-1]+L[i-1] D[i] D i D[i-1]+L[i-1] D[i-1] D i-1 i 1 L[i-1] L i-1 i 1 if(D[i]<=X)
          count++;
      	else
          break; D[i]<=X D[i] D i X count++ count break; System.out.println(count) System.out.println System.out System System.out count in.close() in.close in String[] args args public class Main{
  public static void main(String[] args){
	Scanner in=new Scanner(System.in);
    int N=in.nextInt();
    int X=in.nextInt();
    int D[]=new int[N+1];
    int L[]=new int[N];
    for(int i=0;i<N;i++){
    	L[i]=in.nextInt();
    }
    int count=1;
    for(int i=1;i<N+1;i++){
    	D[i]=D[i-1]+L[i-1];
      	if(D[i]<=X)
          count++;
      	else
          break;
    }
    System.out.println(count);
    in.close();
  }
} public class Main{
  public static void main(String[] args){
	Scanner in=new Scanner(System.in);
    int N=in.nextInt();
    int X=in.nextInt();
    int D[]=new int[N+1];
    int L[]=new int[N];
    for(int i=0;i<N;i++){
    	L[i]=in.nextInt();
    }
    int count=1;
    for(int i=1;i<N+1;i++){
    	D[i]=D[i-1]+L[i-1];
      	if(D[i]<=X)
          count++;
      	else
          break;
    }
    System.out.println(count);
    in.close();
  }
} Main
import java.util.Scanner;
 
public class Main{
  public static void main(String[] args){
	Scanner in=new Scanner(System.in);
    int N=in.nextInt();
    int X=in.nextInt();
    int D[]=new int[N+1];
    int L[]=new int[N];
    for(int i=0;i<N;i++){
    	L[i]=in.nextInt();
    }
    int count=1;
    for(int i=1;i<N+1;i++){
    	D[i]=D[i-1]+L[i-1];
      	if(D[i]<=X)
          count++;
      	else
          break;
    }
    System.out.println(count);
    in.close();
  }
}