import java.util.*;
public class Main {
    Scanner sc = new Scanner(System.in);
    public static void main(String[] args){
        new Main().run();
    }
    void run() {
      int n = sc.nextInt();
      int x = sc.nextInt();
      int[] l = new int[n];
      for(int i = 0; i < n; ++i) {
        l[i] = sc.nextInt();
      }
      int a = 0;
      int c = 1;
      
      for (int j = 0; j < l.length; ++j) {
        a = a + l[j];
        if (a <= x) c++;
      }
      System.out.println(c);
    }
} import java.util.*; util.* java public class Main {
    Scanner sc = new Scanner(System.in);
    public static void main(String[] args){
        new Main().run();
    }
    void run() {
      int n = sc.nextInt();
      int x = sc.nextInt();
      int[] l = new int[n];
      for(int i = 0; i < n; ++i) {
        l[i] = sc.nextInt();
      }
      int a = 0;
      int c = 1;
      
      for (int j = 0; j < l.length; ++j) {
        a = a + l[j];
        if (a <= x) c++;
      }
      System.out.println(c);
    }
} Main Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args){
        new Main().run();
    } main {
        new Main().run();
    } new Main().run() new Main().run new Main() String[] args args void run() {
      int n = sc.nextInt();
      int x = sc.nextInt();
      int[] l = new int[n];
      for(int i = 0; i < n; ++i) {
        l[i] = sc.nextInt();
      }
      int a = 0;
      int c = 1;
      
      for (int j = 0; j < l.length; ++j) {
        a = a + l[j];
        if (a <= x) c++;
      }
      System.out.println(c);
    } run {
      int n = sc.nextInt();
      int x = sc.nextInt();
      int[] l = new int[n];
      for(int i = 0; i < n; ++i) {
        l[i] = sc.nextInt();
      }
      int a = 0;
      int c = 1;
      
      for (int j = 0; j < l.length; ++j) {
        a = a + l[j];
        if (a <= x) c++;
      }
      System.out.println(c);
    } 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 i = 0; i < n; ++i) {
        l[i] = sc.nextInt();
      } int i = 0; int i = 0; i 0 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 a = 0; a 0 int c = 1; c 1 for (int j = 0; j < l.length; ++j) {
        a = a + l[j];
        if (a <= x) c++;
      } int j = 0; int j = 0; j 0 j < l.length j l.length l l.length ++j ++j j {
        a = a + l[j];
        if (a <= x) c++;
      } {
        a = a + l[j];
        if (a <= x) c++;
      } a = a + l[j] a a + l[j] a l[j] l j if (a <= x) c++; a <= x a x c++ c System.out.println(c) System.out.println System.out System System.out c public class Main {
    Scanner sc = new Scanner(System.in);
    public static void main(String[] args){
        new Main().run();
    }
    void run() {
      int n = sc.nextInt();
      int x = sc.nextInt();
      int[] l = new int[n];
      for(int i = 0; i < n; ++i) {
        l[i] = sc.nextInt();
      }
      int a = 0;
      int c = 1;
      
      for (int j = 0; j < l.length; ++j) {
        a = a + l[j];
        if (a <= x) c++;
      }
      System.out.println(c);
    }
} public class Main {
    Scanner sc = new Scanner(System.in);
    public static void main(String[] args){
        new Main().run();
    }
    void run() {
      int n = sc.nextInt();
      int x = sc.nextInt();
      int[] l = new int[n];
      for(int i = 0; i < n; ++i) {
        l[i] = sc.nextInt();
      }
      int a = 0;
      int c = 1;
      
      for (int j = 0; j < l.length; ++j) {
        a = a + l[j];
        if (a <= x) c++;
      }
      System.out.println(c);
    }
} Main
import java.util.*;
public class Main {
    Scanner sc = new Scanner(System.in);
    public static void main(String[] args){
        new Main().run();
    }
    void run() {
      int n = sc.nextInt();
      int x = sc.nextInt();
      int[] l = new int[n];
      for(int i = 0; i < n; ++i) {
        l[i] = sc.nextInt();
      }
      int a = 0;
      int c = 1;
      
      for (int j = 0; j < l.length; ++j) {
        a = a + l[j];
        if (a <= x) c++;
      }
      System.out.println(c);
    }
}
