import java.util.*;

class Main {
  public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
    final int n = sc.nextInt();
    final int x = sc.nextInt();
    final int[] l = new int[n];
    int dist = 0;
    for (int i = 0; i < n; ++i) {
      l[i] = sc.nextInt();
      dist += l[i];
      if (dist > x) {
        System.out.println(i + 1);
        return;
      }
    }
    System.out.println(n + 1);
  }
} import java.util.*; util.* java class Main {
  public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
    final int n = sc.nextInt();
    final int x = sc.nextInt();
    final int[] l = new int[n];
    int dist = 0;
    for (int i = 0; i < n; ++i) {
      l[i] = sc.nextInt();
      dist += l[i];
      if (dist > x) {
        System.out.println(i + 1);
        return;
      }
    }
    System.out.println(n + 1);
  }
} Main public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
    final int n = sc.nextInt();
    final int x = sc.nextInt();
    final int[] l = new int[n];
    int dist = 0;
    for (int i = 0; i < n; ++i) {
      l[i] = sc.nextInt();
      dist += l[i];
      if (dist > x) {
        System.out.println(i + 1);
        return;
      }
    }
    System.out.println(n + 1);
  } main {
	Scanner sc = new Scanner(System.in);
    final int n = sc.nextInt();
    final int x = sc.nextInt();
    final int[] l = new int[n];
    int dist = 0;
    for (int i = 0; i < n; ++i) {
      l[i] = sc.nextInt();
      dist += l[i];
      if (dist > x) {
        System.out.println(i + 1);
        return;
      }
    }
    System.out.println(n + 1);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc final int x = sc.nextInt(); x sc.nextInt() sc.nextInt sc final int[] l = new int[n]; l new int[n] n int dist = 0; dist 0 for (int i = 0; i < n; ++i) {
      l[i] = sc.nextInt();
      dist += l[i];
      if (dist > x) {
        System.out.println(i + 1);
        return;
      }
    } int i = 0; int i = 0; i 0 i < n i n ++i ++i i {
      l[i] = sc.nextInt();
      dist += l[i];
      if (dist > x) {
        System.out.println(i + 1);
        return;
      }
    } {
      l[i] = sc.nextInt();
      dist += l[i];
      if (dist > x) {
        System.out.println(i + 1);
        return;
      }
    } l[i] = sc.nextInt() l[i] l i sc.nextInt() sc.nextInt sc dist += l[i] dist l[i] l i if (dist > x) {
        System.out.println(i + 1);
        return;
      } dist > x dist x {
        System.out.println(i + 1);
        return;
      } System.out.println(i + 1) System.out.println System.out System System.out i + 1 i 1 return; System.out.println(n + 1) System.out.println System.out System System.out n + 1 n 1 String[] args args
import java.util.*;

class Main {
  public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
    final int n = sc.nextInt();
    final int x = sc.nextInt();
    final int[] l = new int[n];
    int dist = 0;
    for (int i = 0; i < n; ++i) {
      l[i] = sc.nextInt();
      dist += l[i];
      if (dist > x) {
        System.out.println(i + 1);
        return;
      }
    }
    System.out.println(n + 1);
  }
}
