import java.util.*;

class Main {

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

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

    int N = sc.nextInt();
    int X = sc.nextInt();
    int a[] = new int[N+1];
    int sum = 0;
    for (int i = 0; i <= N; i++) {
      if (i == 0) a[0] = 0;
      else {
        a[i] = sc.nextInt();
        sum += a[i];
      }
      if (sum > X) {
        System.out.println(i);
        return;
      }
    }
    System.out.println(N+1);
  }
} Main public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();
    int X = sc.nextInt();
    int a[] = new int[N+1];
    int sum = 0;
    for (int i = 0; i <= N; i++) {
      if (i == 0) a[0] = 0;
      else {
        a[i] = sc.nextInt();
        sum += a[i];
      }
      if (sum > X) {
        System.out.println(i);
        return;
      }
    }
    System.out.println(N+1);
  } main {
    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();
    int X = sc.nextInt();
    int a[] = new int[N+1];
    int sum = 0;
    for (int i = 0; i <= N; i++) {
      if (i == 0) a[0] = 0;
      else {
        a[i] = sc.nextInt();
        sum += a[i];
      }
      if (sum > X) {
        System.out.println(i);
        return;
      }
    }
    System.out.println(N+1);
  } 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 a[] = new int[N+1]; a new int[N+1] N+1 N 1 int sum = 0; sum 0 for (int i = 0; i <= N; i++) {
      if (i == 0) a[0] = 0;
      else {
        a[i] = sc.nextInt();
        sum += a[i];
      }
      if (sum > X) {
        System.out.println(i);
        return;
      }
    } int i = 0; int i = 0; i 0 i <= N i N i++ i++ i {
      if (i == 0) a[0] = 0;
      else {
        a[i] = sc.nextInt();
        sum += a[i];
      }
      if (sum > X) {
        System.out.println(i);
        return;
      }
    } {
      if (i == 0) a[0] = 0;
      else {
        a[i] = sc.nextInt();
        sum += a[i];
      }
      if (sum > X) {
        System.out.println(i);
        return;
      }
    } if (i == 0) a[0] = 0;
      else {
        a[i] = sc.nextInt();
        sum += a[i];
      } i == 0 i 0 a[0] = 0 a[0] a 0 0 {
        a[i] = sc.nextInt();
        sum += a[i];
      } a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc sum += a[i] sum a[i] a i if (sum > X) {
        System.out.println(i);
        return;
      } sum > X sum X {
        System.out.println(i);
        return;
      } System.out.println(i) System.out.println System.out System System.out i 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);

    int N = sc.nextInt();
    int X = sc.nextInt();
    int a[] = new int[N+1];
    int sum = 0;
    for (int i = 0; i <= N; i++) {
      if (i == 0) a[0] = 0;
      else {
        a[i] = sc.nextInt();
        sum += a[i];
      }
      if (sum > X) {
        System.out.println(i);
        return;
      }
    }
    System.out.println(N+1);
  }
}
