import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int cnt = sc.nextInt();
    int bnd = sc.nextInt();
    int a[] = new int[cnt];
    int dist=0;
    int answer=1;
    for(int i=0;i<cnt;i++){
      a[i]=sc.nextInt();
    }
    for(int i=0;i<cnt;i++){
      
      dist+=a[i];
      if(dist>bnd){  
        break;
      }
      answer++;
    }
    System.out.println(answer);
  }
} import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int cnt = sc.nextInt();
    int bnd = sc.nextInt();
    int a[] = new int[cnt];
    int dist=0;
    int answer=1;
    for(int i=0;i<cnt;i++){
      a[i]=sc.nextInt();
    }
    for(int i=0;i<cnt;i++){
      
      dist+=a[i];
      if(dist>bnd){  
        break;
      }
      answer++;
    }
    System.out.println(answer);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int cnt = sc.nextInt();
    int bnd = sc.nextInt();
    int a[] = new int[cnt];
    int dist=0;
    int answer=1;
    for(int i=0;i<cnt;i++){
      a[i]=sc.nextInt();
    }
    for(int i=0;i<cnt;i++){
      
      dist+=a[i];
      if(dist>bnd){  
        break;
      }
      answer++;
    }
    System.out.println(answer);
  } main {
    Scanner sc = new Scanner(System.in);
    int cnt = sc.nextInt();
    int bnd = sc.nextInt();
    int a[] = new int[cnt];
    int dist=0;
    int answer=1;
    for(int i=0;i<cnt;i++){
      a[i]=sc.nextInt();
    }
    for(int i=0;i<cnt;i++){
      
      dist+=a[i];
      if(dist>bnd){  
        break;
      }
      answer++;
    }
    System.out.println(answer);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int cnt = sc.nextInt(); cnt sc.nextInt() sc.nextInt sc int bnd = sc.nextInt(); bnd sc.nextInt() sc.nextInt sc int a[] = new int[cnt]; a new int[cnt] cnt int dist=0; dist 0 int answer=1; answer 1 for(int i=0;i<cnt;i++){
      a[i]=sc.nextInt();
    } int i=0; int i=0; i 0 i<cnt i cnt i++ i++ i {
      a[i]=sc.nextInt();
    } {
      a[i]=sc.nextInt();
    } a[i]=sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc for(int i=0;i<cnt;i++){
      
      dist+=a[i];
      if(dist>bnd){  
        break;
      }
      answer++;
    } int i=0; int i=0; i 0 i<cnt i cnt i++ i++ i {
      
      dist+=a[i];
      if(dist>bnd){  
        break;
      }
      answer++;
    } {
      
      dist+=a[i];
      if(dist>bnd){  
        break;
      }
      answer++;
    } dist+=a[i] dist a[i] a i if(dist>bnd){  
        break;
      } dist>bnd dist bnd {  
        break;
      } break; answer++ answer System.out.println(answer) System.out.println System.out System System.out answer String[] args args public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int cnt = sc.nextInt();
    int bnd = sc.nextInt();
    int a[] = new int[cnt];
    int dist=0;
    int answer=1;
    for(int i=0;i<cnt;i++){
      a[i]=sc.nextInt();
    }
    for(int i=0;i<cnt;i++){
      
      dist+=a[i];
      if(dist>bnd){  
        break;
      }
      answer++;
    }
    System.out.println(answer);
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int cnt = sc.nextInt();
    int bnd = sc.nextInt();
    int a[] = new int[cnt];
    int dist=0;
    int answer=1;
    for(int i=0;i<cnt;i++){
      a[i]=sc.nextInt();
    }
    for(int i=0;i<cnt;i++){
      
      dist+=a[i];
      if(dist>bnd){  
        break;
      }
      answer++;
    }
    System.out.println(answer);
  }
} Main
import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int cnt = sc.nextInt();
    int bnd = sc.nextInt();
    int a[] = new int[cnt];
    int dist=0;
    int answer=1;
    for(int i=0;i<cnt;i++){
      a[i]=sc.nextInt();
    }
    for(int i=0;i<cnt;i++){
      
      dist+=a[i];
      if(dist>bnd){  
        break;
      }
      answer++;
    }
    System.out.println(answer);
  }
}