import java.util.*;
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int x = sc.nextInt();
    int m[] = new int[n];
    int sum = 0;
    int count = 0;
    for(int i = 0 ; i < n ; ++i){
      m[i] = sc.nextInt();
      sum += m[i];
      count++;
    }
    
    Arrays.sort(m);
    
    for(int i = 0 ; i < 100000 ; ++i){
      if(sum<x){
        sum += m[0];
        count++;
      }else{
        break;
      }
    }
    
    if(sum>x){
      count -= 1;
    }

    
    
    System.out.println(count);
    
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int x = sc.nextInt();
    int m[] = new int[n];
    int sum = 0;
    int count = 0;
    for(int i = 0 ; i < n ; ++i){
      m[i] = sc.nextInt();
      sum += m[i];
      count++;
    }
    
    Arrays.sort(m);
    
    for(int i = 0 ; i < 100000 ; ++i){
      if(sum<x){
        sum += m[0];
        count++;
      }else{
        break;
      }
    }
    
    if(sum>x){
      count -= 1;
    }

    
    
    System.out.println(count);
    
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int x = sc.nextInt();
    int m[] = new int[n];
    int sum = 0;
    int count = 0;
    for(int i = 0 ; i < n ; ++i){
      m[i] = sc.nextInt();
      sum += m[i];
      count++;
    }
    
    Arrays.sort(m);
    
    for(int i = 0 ; i < 100000 ; ++i){
      if(sum<x){
        sum += m[0];
        count++;
      }else{
        break;
      }
    }
    
    if(sum>x){
      count -= 1;
    }

    
    
    System.out.println(count);
    
  } main {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int x = sc.nextInt();
    int m[] = new int[n];
    int sum = 0;
    int count = 0;
    for(int i = 0 ; i < n ; ++i){
      m[i] = sc.nextInt();
      sum += m[i];
      count++;
    }
    
    Arrays.sort(m);
    
    for(int i = 0 ; i < 100000 ; ++i){
      if(sum<x){
        sum += m[0];
        count++;
      }else{
        break;
      }
    }
    
    if(sum>x){
      count -= 1;
    }

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

    
    
    System.out.println(count);
    
  }
} public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int x = sc.nextInt();
    int m[] = new int[n];
    int sum = 0;
    int count = 0;
    for(int i = 0 ; i < n ; ++i){
      m[i] = sc.nextInt();
      sum += m[i];
      count++;
    }
    
    Arrays.sort(m);
    
    for(int i = 0 ; i < 100000 ; ++i){
      if(sum<x){
        sum += m[0];
        count++;
      }else{
        break;
      }
    }
    
    if(sum>x){
      count -= 1;
    }

    
    
    System.out.println(count);
    
  }
} Main
import java.util.*;
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int x = sc.nextInt();
    int m[] = new int[n];
    int sum = 0;
    int count = 0;
    for(int i = 0 ; i < n ; ++i){
      m[i] = sc.nextInt();
      sum += m[i];
      count++;
    }
    
    Arrays.sort(m);
    
    for(int i = 0 ; i < 100000 ; ++i){
      if(sum<x){
        sum += m[0];
        count++;
      }else{
        break;
      }
    }
    
    if(sum>x){
      count -= 1;
    }

    
    
    System.out.println(count);
    
  }
}
