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