import java.util.*;

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

public class Main {
  public static void main(String[] args) {
	  Scanner sc = new Scanner(System.in);
	  int N = Integer.parseInt(sc.next());
	  int X = Integer.parseInt(sc.next());
	  
	  int D = 0;
	  int count = 1;
	  for(int i = 0; i < N; i++) {
		  D += Integer.parseInt(sc.next());
		  if(D <= X)
			  count++;
		  else
			  break;
		  
	  }
	  System.out.println(count);
	  sc.close();
	  
  }
}
