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[] L = new int[N+1];
    for (int i = 1; i <= N; i++) {
      L[i] = sc.nextInt();
    }

    int ans = N+1;
    int D = 0;
    for (int i = 2; i <= N+1; i++) {
      D = D + L[i-1];
      if (X < D) {
        ans = i-1;
        break;
      }
    }
    
    System.out.println(ans);
  }
} 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[] L = new int[N+1];
    for (int i = 1; i <= N; i++) {
      L[i] = sc.nextInt();
    }

    int ans = N+1;
    int D = 0;
    for (int i = 2; i <= N+1; i++) {
      D = D + L[i-1];
      if (X < D) {
        ans = i-1;
        break;
      }
    }
    
    System.out.println(ans);
  }
} Main public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int X = sc.nextInt();
    int[] L = new int[N+1];
    for (int i = 1; i <= N; i++) {
      L[i] = sc.nextInt();
    }

    int ans = N+1;
    int D = 0;
    for (int i = 2; i <= N+1; i++) {
      D = D + L[i-1];
      if (X < D) {
        ans = i-1;
        break;
      }
    }
    
    System.out.println(ans);
  } main {

    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int X = sc.nextInt();
    int[] L = new int[N+1];
    for (int i = 1; i <= N; i++) {
      L[i] = sc.nextInt();
    }

    int ans = N+1;
    int D = 0;
    for (int i = 2; i <= N+1; i++) {
      D = D + L[i-1];
      if (X < D) {
        ans = i-1;
        break;
      }
    }
    
    System.out.println(ans);
  } 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[] L = new int[N+1]; L new int[N+1] N+1 N 1 for (int i = 1; i <= N; i++) {
      L[i] = sc.nextInt();
    } int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {
      L[i] = sc.nextInt();
    } {
      L[i] = sc.nextInt();
    } L[i] = sc.nextInt() L[i] L i sc.nextInt() sc.nextInt sc int ans = N+1; ans N+1 N 1 int D = 0; D 0 for (int i = 2; i <= N+1; i++) {
      D = D + L[i-1];
      if (X < D) {
        ans = i-1;
        break;
      }
    } int i = 2; int i = 2; i 2 i <= N+1 i N+1 N 1 i++ i++ i {
      D = D + L[i-1];
      if (X < D) {
        ans = i-1;
        break;
      }
    } {
      D = D + L[i-1];
      if (X < D) {
        ans = i-1;
        break;
      }
    } D = D + L[i-1] D D + L[i-1] D L[i-1] L i-1 i 1 if (X < D) {
        ans = i-1;
        break;
      } X < D X D {
        ans = i-1;
        break;
      } ans = i-1 ans i-1 i 1 break; System.out.println(ans) System.out.println System.out System System.out ans 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[] L = new int[N+1];
    for (int i = 1; i <= N; i++) {
      L[i] = sc.nextInt();
    }

    int ans = N+1;
    int D = 0;
    for (int i = 2; i <= N+1; i++) {
      D = D + L[i-1];
      if (X < D) {
        ans = i-1;
        break;
      }
    }
    
    System.out.println(ans);
  }
} public class Main {
  
  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int X = sc.nextInt();
    int[] L = new int[N+1];
    for (int i = 1; i <= N; i++) {
      L[i] = sc.nextInt();
    }

    int ans = N+1;
    int D = 0;
    for (int i = 2; i <= N+1; i++) {
      D = D + L[i-1];
      if (X < D) {
        ans = i-1;
        break;
      }
    }
    
    System.out.println(ans);
  }
} 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[] L = new int[N+1];
    for (int i = 1; i <= N; i++) {
      L[i] = sc.nextInt();
    }

    int ans = N+1;
    int D = 0;
    for (int i = 2; i <= N+1; i++) {
      D = D + L[i-1];
      if (X < D) {
        ans = i-1;
        break;
      }
    }
    
    System.out.println(ans);
  }
}
