import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    Scanner s = new Scanner(System.in);
    int a = s.nextInt();
    int b = s.nextInt();

    int sum = 0;
    int count = 0;
    for(int i = 0; i < a; i++){
      int c =s.nextInt();
      sum = c + sum;
      if(sum <= b){
        count++;
      }else{

      }
    }
    System.out.println(count + 1);
  }
} import java.util.Scanner; Scanner java.util public class Main{
  public static void main(String[] args){
    Scanner s = new Scanner(System.in);
    int a = s.nextInt();
    int b = s.nextInt();

    int sum = 0;
    int count = 0;
    for(int i = 0; i < a; i++){
      int c =s.nextInt();
      sum = c + sum;
      if(sum <= b){
        count++;
      }else{

      }
    }
    System.out.println(count + 1);
  }
} Main public static void main(String[] args){
    Scanner s = new Scanner(System.in);
    int a = s.nextInt();
    int b = s.nextInt();

    int sum = 0;
    int count = 0;
    for(int i = 0; i < a; i++){
      int c =s.nextInt();
      sum = c + sum;
      if(sum <= b){
        count++;
      }else{

      }
    }
    System.out.println(count + 1);
  } main {
    Scanner s = new Scanner(System.in);
    int a = s.nextInt();
    int b = s.nextInt();

    int sum = 0;
    int count = 0;
    for(int i = 0; i < a; i++){
      int c =s.nextInt();
      sum = c + sum;
      if(sum <= b){
        count++;
      }else{

      }
    }
    System.out.println(count + 1);
  } Scanner s = new Scanner(System.in); s new Scanner(System.in) int a = s.nextInt(); a s.nextInt() s.nextInt s int b = s.nextInt(); b s.nextInt() s.nextInt s int sum = 0; sum 0 int count = 0; count 0 for(int i = 0; i < a; i++){
      int c =s.nextInt();
      sum = c + sum;
      if(sum <= b){
        count++;
      }else{

      }
    } int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
      int c =s.nextInt();
      sum = c + sum;
      if(sum <= b){
        count++;
      }else{

      }
    } {
      int c =s.nextInt();
      sum = c + sum;
      if(sum <= b){
        count++;
      }else{

      }
    } int c =s.nextInt(); c s.nextInt() s.nextInt s sum = c + sum sum c + sum c sum if(sum <= b){
        count++;
      }else{

      } sum <= b sum b {
        count++;
      } count++ count {

      } System.out.println(count + 1) System.out.println System.out System System.out count + 1 count 1 String[] args args public class Main{
  public static void main(String[] args){
    Scanner s = new Scanner(System.in);
    int a = s.nextInt();
    int b = s.nextInt();

    int sum = 0;
    int count = 0;
    for(int i = 0; i < a; i++){
      int c =s.nextInt();
      sum = c + sum;
      if(sum <= b){
        count++;
      }else{

      }
    }
    System.out.println(count + 1);
  }
} public class Main{
  public static void main(String[] args){
    Scanner s = new Scanner(System.in);
    int a = s.nextInt();
    int b = s.nextInt();

    int sum = 0;
    int count = 0;
    for(int i = 0; i < a; i++){
      int c =s.nextInt();
      sum = c + sum;
      if(sum <= b){
        count++;
      }else{

      }
    }
    System.out.println(count + 1);
  }
} Main
import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    Scanner s = new Scanner(System.in);
    int a = s.nextInt();
    int b = s.nextInt();

    int sum = 0;
    int count = 0;
    for(int i = 0; i < a; i++){
      int c =s.nextInt();
      sum = c + sum;
      if(sum <= b){
        count++;
      }else{

      }
    }
    System.out.println(count + 1);
  }
}
