import java.util.*;

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

    int n = sc.nextInt();
    long x = sc.nextInt();
    int d = 0;
    int ans = 1;

    for(int i = 0; i < n; i++){
      int l = sc.nextInt();
      if(d + l <= x){
        d += l;
        ans += 1;
      } else {
        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();
    long x = sc.nextInt();
    int d = 0;
    int ans = 1;

    for(int i = 0; i < n; i++){
      int l = sc.nextInt();
      if(d + l <= x){
        d += l;
        ans += 1;
      } else {
        break;
      }
    }

    System.out.println(ans);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();
    long x = sc.nextInt();
    int d = 0;
    int ans = 1;

    for(int i = 0; i < n; i++){
      int l = sc.nextInt();
      if(d + l <= x){
        d += l;
        ans += 1;
      } else {
        break;
      }
    }

    System.out.println(ans);
  } main {
    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();
    long x = sc.nextInt();
    int d = 0;
    int ans = 1;

    for(int i = 0; i < n; i++){
      int l = sc.nextInt();
      if(d + l <= x){
        d += l;
        ans += 1;
      } else {
        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 long x = sc.nextInt(); x sc.nextInt() sc.nextInt sc int d = 0; d 0 int ans = 1; ans 1 for(int i = 0; i < n; i++){
      int l = sc.nextInt();
      if(d + l <= x){
        d += l;
        ans += 1;
      } else {
        break;
      }
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      int l = sc.nextInt();
      if(d + l <= x){
        d += l;
        ans += 1;
      } else {
        break;
      }
    } {
      int l = sc.nextInt();
      if(d + l <= x){
        d += l;
        ans += 1;
      } else {
        break;
      }
    } int l = sc.nextInt(); l sc.nextInt() sc.nextInt sc if(d + l <= x){
        d += l;
        ans += 1;
      } else {
        break;
      } d + l <= x d + l d l x {
        d += l;
        ans += 1;
      } d += l d l ans += 1 ans 1 {
        break;
      } 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();
    long x = sc.nextInt();
    int d = 0;
    int ans = 1;

    for(int i = 0; i < n; i++){
      int l = sc.nextInt();
      if(d + l <= x){
        d += l;
        ans += 1;
      } else {
        break;
      }
    }

    System.out.println(ans);
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();
    long x = sc.nextInt();
    int d = 0;
    int ans = 1;

    for(int i = 0; i < n; i++){
      int l = sc.nextInt();
      if(d + l <= x){
        d += l;
        ans += 1;
      } else {
        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();
    long x = sc.nextInt();
    int d = 0;
    int ans = 1;

    for(int i = 0; i < n; i++){
      int l = sc.nextInt();
      if(d + l <= x){
        d += l;
        ans += 1;
      } else {
        break;
      }
    }

    System.out.println(ans);
  }
}
