import java.util.*;

public class Main{
  public static void main(String[] args) {
    Scanner s = new Scanner(System.in);

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

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

    int N = s.nextInt();
    int X = s.nextInt();
    int D = 0;
    int[] L = new int[N];
    int count = 1;
    for(int i = 0;i < N; i++){
      L[i] = s.nextInt();
    }
    for(int i = 0;i < N; i++){
      D = D + L[i];
      if(D <= X)count++;
    }
    System.out.println(count);
  } main {
    Scanner s = new Scanner(System.in);

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

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

    int N = s.nextInt();
    int X = s.nextInt();
    int D = 0;
    int[] L = new int[N];
    int count = 1;
    for(int i = 0;i < N; i++){
      L[i] = s.nextInt();
    }
    for(int i = 0;i < N; i++){
      D = D + L[i];
      if(D <= X)count++;
    }
    System.out.println(count);
  }
} Main
import java.util.*;

public class Main{
  public static void main(String[] args) {
    Scanner s = new Scanner(System.in);

    int N = s.nextInt();
    int X = s.nextInt();
    int D = 0;
    int[] L = new int[N];
    int count = 1;
    for(int i = 0;i < N; i++){
      L[i] = s.nextInt();
    }
    for(int i = 0;i < N; i++){
      D = D + L[i];
      if(D <= X)count++;
    }
    System.out.println(count);
  }
}
