import java.util.Scanner;

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];
    for (int cnt = 0; cnt < n; cnt++) {
      l[cnt] = sc.nextInt();
    }
    int d = 0;
    int i = 0;
    for (int cnt = 0; cnt < n; cnt++) {
      d += l[cnt];
      if (d > x) {
        i = cnt + 1;
        break;
      } else {
        i = n + 1;
      }
    }
    System.out.println(i);
    sc.close();
  }
} import java.util.Scanner; Scanner 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];
    for (int cnt = 0; cnt < n; cnt++) {
      l[cnt] = sc.nextInt();
    }
    int d = 0;
    int i = 0;
    for (int cnt = 0; cnt < n; cnt++) {
      d += l[cnt];
      if (d > x) {
        i = cnt + 1;
        break;
      } else {
        i = n + 1;
      }
    }
    System.out.println(i);
    sc.close();
  }
} 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];
    for (int cnt = 0; cnt < n; cnt++) {
      l[cnt] = sc.nextInt();
    }
    int d = 0;
    int i = 0;
    for (int cnt = 0; cnt < n; cnt++) {
      d += l[cnt];
      if (d > x) {
        i = cnt + 1;
        break;
      } else {
        i = n + 1;
      }
    }
    System.out.println(i);
    sc.close();
  } main {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int x = sc.nextInt();
    int l[] = new int[n];
    for (int cnt = 0; cnt < n; cnt++) {
      l[cnt] = sc.nextInt();
    }
    int d = 0;
    int i = 0;
    for (int cnt = 0; cnt < n; cnt++) {
      d += l[cnt];
      if (d > x) {
        i = cnt + 1;
        break;
      } else {
        i = n + 1;
      }
    }
    System.out.println(i);
    sc.close();
  } 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]; l new int[n] n for (int cnt = 0; cnt < n; cnt++) {
      l[cnt] = sc.nextInt();
    } int cnt = 0; int cnt = 0; cnt 0 cnt < n cnt n cnt++ cnt++ cnt {
      l[cnt] = sc.nextInt();
    } {
      l[cnt] = sc.nextInt();
    } l[cnt] = sc.nextInt() l[cnt] l cnt sc.nextInt() sc.nextInt sc int d = 0; d 0 int i = 0; i 0 for (int cnt = 0; cnt < n; cnt++) {
      d += l[cnt];
      if (d > x) {
        i = cnt + 1;
        break;
      } else {
        i = n + 1;
      }
    } int cnt = 0; int cnt = 0; cnt 0 cnt < n cnt n cnt++ cnt++ cnt {
      d += l[cnt];
      if (d > x) {
        i = cnt + 1;
        break;
      } else {
        i = n + 1;
      }
    } {
      d += l[cnt];
      if (d > x) {
        i = cnt + 1;
        break;
      } else {
        i = n + 1;
      }
    } d += l[cnt] d l[cnt] l cnt if (d > x) {
        i = cnt + 1;
        break;
      } else {
        i = n + 1;
      } d > x d x {
        i = cnt + 1;
        break;
      } i = cnt + 1 i cnt + 1 cnt 1 break; {
        i = n + 1;
      } i = n + 1 i n + 1 n 1 System.out.println(i) System.out.println System.out System System.out i 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 = sc.nextInt();
    int x = sc.nextInt();
    int l[] = new int[n];
    for (int cnt = 0; cnt < n; cnt++) {
      l[cnt] = sc.nextInt();
    }
    int d = 0;
    int i = 0;
    for (int cnt = 0; cnt < n; cnt++) {
      d += l[cnt];
      if (d > x) {
        i = cnt + 1;
        break;
      } else {
        i = n + 1;
      }
    }
    System.out.println(i);
    sc.close();
  }
} 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];
    for (int cnt = 0; cnt < n; cnt++) {
      l[cnt] = sc.nextInt();
    }
    int d = 0;
    int i = 0;
    for (int cnt = 0; cnt < n; cnt++) {
      d += l[cnt];
      if (d > x) {
        i = cnt + 1;
        break;
      } else {
        i = n + 1;
      }
    }
    System.out.println(i);
    sc.close();
  }
} Main
import java.util.Scanner;

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];
    for (int cnt = 0; cnt < n; cnt++) {
      l[cnt] = sc.nextInt();
    }
    int d = 0;
    int i = 0;
    for (int cnt = 0; cnt < n; cnt++) {
      d += l[cnt];
      if (d > x) {
        i = cnt + 1;
        break;
      } else {
        i = n + 1;
      }
    }
    System.out.println(i);
    sc.close();
  }
}