import java.util.*;
import java.io.*;

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

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