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 i = 0;
      int D = 0;
      int bound=1;
      while(D <= X && i < N) {
          D = D + Integer.parseInt(sc.next());
          i++;
          if(D <= X)
          	bound+=1;
      }

      System.out.println(bound);
 
      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 i = 0;
      int D = 0;
      int bound=1;
      while(D <= X && i < N) {
          D = D + Integer.parseInt(sc.next());
          i++;
          if(D <= X)
          	bound+=1;
      }

      System.out.println(bound);
 
      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 i = 0;
      int D = 0;
      int bound=1;
      while(D <= X && i < N) {
          D = D + Integer.parseInt(sc.next());
          i++;
          if(D <= X)
          	bound+=1;
      }

      System.out.println(bound);
 
      sc.close();
      
  } main {
      Scanner sc = new Scanner(System.in);
      int N = Integer.parseInt(sc.next());
      int X = Integer.parseInt(sc.next());
      
      int i = 0;
      int D = 0;
      int bound=1;
      while(D <= X && i < N) {
          D = D + Integer.parseInt(sc.next());
          i++;
          if(D <= X)
          	bound+=1;
      }

      System.out.println(bound);
 
      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 i = 0; i 0 int D = 0; D 0 int bound=1; bound 1 while(D <= X && i < N) {
          D = D + Integer.parseInt(sc.next());
          i++;
          if(D <= X)
          	bound+=1;
      } D <= X && i < N D <= X D X i < N i N {
          D = D + Integer.parseInt(sc.next());
          i++;
          if(D <= X)
          	bound+=1;
      } D = D + Integer.parseInt(sc.next()) D D + Integer.parseInt(sc.next()) D Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc i++ i if(D <= X)
          	bound+=1; D <= X D X bound+=1 bound 1 System.out.println(bound) System.out.println System.out System System.out bound 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 i = 0;
      int D = 0;
      int bound=1;
      while(D <= X && i < N) {
          D = D + Integer.parseInt(sc.next());
          i++;
          if(D <= X)
          	bound+=1;
      }

      System.out.println(bound);
 
      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 i = 0;
      int D = 0;
      int bound=1;
      while(D <= X && i < N) {
          D = D + Integer.parseInt(sc.next());
          i++;
          if(D <= X)
          	bound+=1;
      }

      System.out.println(bound);
 
      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 i = 0;
      int D = 0;
      int bound=1;
      while(D <= X && i < N) {
          D = D + Integer.parseInt(sc.next());
          i++;
          if(D <= X)
          	bound+=1;
      }

      System.out.println(bound);
 
      sc.close();
      
  }
}