import java.util.*;
 public class Main
{
 public static void main(String [] args)
{
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
for(int ii=0;ii<t;ii++)
{
int n=sc.nextInt();
int k=sc.nextInt();
PriorityQueue<Integer> pq=new PriorityQueue<Integer>();
int ar[]=new int[n];
int max=-1;
for(int i=0;i<n;i++)
{int f=sc.nextInt();
    pq.add(f);
    max=Math.max(max,f);}int count=0;
    while(max<=k&&pq.size()>1)
    {
        int one=pq.poll();
        int two=pq.poll();
        int fucj=one+two;
        pq.add(fucj);
        pq.add(one);
        max=Math.max(fucj,max);

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


import java.util.*;
public class Main
{
 public static void main(String[] args)
{
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
for(int ii=0;ii<t;ii++)
{
int n=sc.nextInt();
int k=sc.nextInt();
PriorityQueue<Integer> pq=new PriorityQueue<Integer>();
int ar[]=new int[n];
int max=-1;
for(int i=0;i<n;i++)
{int f=sc.nextInt();
    pq.add(f);
    max=Math.max(max,f);}
    int count=0;
    while(max<k&&pq.size()>1)
    {
        int one=pq.poll();
        int two=pq.poll();
        int fucj=one+two;
        pq.add(fucj);
        pq.add(one);
        max=Math.max(fucj,max);

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


import java.util.*;
 public class Main
{
 public static void main(String [] args)
{
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
for(int ii=0;ii<t;ii++)
{
int n=sc.nextInt();
int k=sc.nextInt();
PriorityQueue<Long> pq=new PriorityQueue<Long>();
long ar[]=new long[n];
long max=-1;
for(int i=0;i<n;i++)
{long f=sc.nextLong();
    pq.add(f);
    max=Math.max(max,f);}long count=0;
    while(max<=k&&pq.size()>1)
    {
        long one=pq.poll();
        long two=pq.poll();
        long fucj=one+two;
        pq.add(fucj);
        pq.add(one);
        max=Math.max(fucj,max);

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


import java.util.*;
 public class test
{
 public static void main(String[] args)
{ System.out.println();
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
for(int ii=0;ii<t;ii++)
{
int n=sc.nextInt();
int k=sc.nextInt();
PriorityQueue<Integer> pq=new PriorityQueue<Integer>();
int ar[]=new int[n];
int max=-1;
for(int i=0;i<n;i++)
{int f=sc.nextInt();
    pq.add(f);
    max=Math.max(max,f);}
    int count=0;
    while(max<k&&pq.size()>1)
    {
        int one=pq.poll();
        int two=pq.poll();
        int fucj=one+two;
        pq.add(fucj);
        pq.add(one);
        max=Math.max(fucj,max);

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


import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        while (t-- > 0) {
            int n = sc.nextInt();
            int k=sc.nextInt();
            int[] a = new int[n];

            for (int i = 0; i < n; i++) {
                a[i] = sc.nextInt();
            }
            int m=0;
            Arrays.sort(a);
            int max=Integer.MIN_VALUE;
           for(int i=0;i<n;i++)
           {
               int c=0;

               for(int j=i+1;j<n;j++)
               {
                   c=c+((k-a[j])/a[i]);
               }
               if(c>max)
               {
                   max=c;

               }

           }
            System.out.println(max);
        }

    }

}


import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        while (t-- > 0) {
            int n = sc.nextInt();
            int k=sc.nextInt();
            int[] a = new int[n];

            for (int i = 0; i < n; i++) {
                a[i] = sc.nextInt();
            }
            int m=0;
            int c=0;

            int max=Integer.MIN_VALUE;
           for(int i=0;i<n;i++)
           {

               for(int j=i+1;j<n;j++)
               {
                   c=c+((k-a[j])/a[i]);
               }

           }
            System.out.println(c);
        }

    }

}


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

public class A {
    public static void main(String[] args) throws IOException {
        FastScanner in = new FastScanner(System.in);
		PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
        int bruh = in.nextInt();

		for (int cases = 0; cases < bruh; cases++) {
			int n = in.nextInt();
			int k = in.nextInt();
			int[] nums = in.nextIntArr(n);
			Arrays.sort(nums);
			int ct = 0;
			for (int i = n - 1; i > 0; i--) {
				ct += (k - nums[i]) / nums[0];
			}
			out.println(ct);
		}

		out.close();

    }

    static class FastScanner {
        BufferedReader br;
        StringTokenizer st;
        public FastScanner(InputStream i) {
            br = new BufferedReader(new InputStreamReader(i));
            st = new StringTokenizer("");
        }
        public String next() throws IOException {
            if (st.hasMoreTokens()) {
                return st.nextToken();
            }
            else
                st = new StringTokenizer(br.readLine());
            return next();
        }
        public int nextInt() throws IOException {
            return Integer.parseInt(next());
        }
        public double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }
        public long nextLong() throws IOException {
            return Long.parseLong(next());
        }
		public String nextLine() throws IOException {
            if (!st.hasMoreTokens()) {
                st = new StringTokenizer(br.readLine());
                return nextLine();
            }

            String ret = "";
            while (st.hasMoreTokens()) {
                ret += " " + st.nextToken();
            }
            return ret.substring(1);
        }
        public int[] nextIntArr(int size) throws IOException {
            int[] arr = new int[size];
            for (int i = 0; i < arr.length; i++) {
                arr[i] = nextInt();
            }
            return arr;
        }
        public long[] nextLongArr(int size) throws IOException {
            long[] arr = new long[size];
            for (int i = 0; i < arr.length; i++) {
                arr[i] = nextLong();
            }
            return arr;
        }
		public double[] nextDoubleArr(int size) throws IOException {
            double[] arr = new double[size];
            for (int i = 0; i < arr.length; i++) {
                arr[i] = nextDouble();
            }
            return arr;
        }
    }
}


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

public class A {
    public static void main(String[] args) throws IOException {
        FastScanner in = new FastScanner(System.in);
		PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
        int bruh = in.nextInt();

		for (int cases = 0; cases < bruh; cases++) {
			int n = in.nextInt();
			int k = in.nextInt();
			int[] nums = new int[n];
			int[] min = new int[n];
			for (int i = 0; i < n; i++) {
				nums[i] = in.nextInt();
				min[i] = nums[i];
				if (i != 0) min[i] = Math.min(min[i], min[i - 1]);
			}

			int ct = 0;
			for (int i = n - 1; i > 0; i--) {
				ct += (k - nums[i]) / min[i - 1];

				if (i == 1 && (k - nums[i]) % min[i - 1] != 0) ct++;
			}
			out.println(ct);
		}

		out.close();

    }

    static class FastScanner {
        BufferedReader br;
        StringTokenizer st;
        public FastScanner(InputStream i) {
            br = new BufferedReader(new InputStreamReader(i));
            st = new StringTokenizer("");
        }
        public String next() throws IOException {
            if (st.hasMoreTokens()) {
                return st.nextToken();
            }
            else
                st = new StringTokenizer(br.readLine());
            return next();
        }
        public int nextInt() throws IOException {
            return Integer.parseInt(next());
        }
        public double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }
        public long nextLong() throws IOException {
            return Long.parseLong(next());
        }
		public String nextLine() throws IOException {
            if (!st.hasMoreTokens()) {
                st = new StringTokenizer(br.readLine());
                return nextLine();
            }

            String ret = "";
            while (st.hasMoreTokens()) {
                ret += " " + st.nextToken();
            }
            return ret.substring(1);
        }
        public int[] nextIntArr(int size) throws IOException {
            int[] arr = new int[size];
            for (int i = 0; i < arr.length; i++) {
                arr[i] = nextInt();
            }
            return arr;
        }
        public long[] nextLongArr(int size) throws IOException {
            long[] arr = new long[size];
            for (int i = 0; i < arr.length; i++) {
                arr[i] = nextLong();
            }
            return arr;
        }
		public double[] nextDoubleArr(int size) throws IOException {
            double[] arr = new double[size];
            for (int i = 0; i < arr.length; i++) {
                arr[i] = nextDouble();
            }
            return arr;
        }
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;
import java.util.*;

public class copy_paste
{
    //By shwetank_verma
    static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
    static int mod=1000000007;
    static boolean primes[]=new boolean[1000007];

    static boolean seive(int n){
        Arrays.fill(primes,true);
        primes[0]=primes[1]=false;
        for(int i=2;i*i<=n;i++){
            if(primes[i]==true){
                for(int p=i*i;p<=n;p+=i){
                    primes[p]=false;
                }
            }
        }
        if(n<1000007){
            return primes[n];
        }
        return false;

    }
    static int gcd(int a,int b){
        if(b==0)
        return a;
        return gcd(b,a%b);
    }
    static long GCD(long a,long b){
        if(b==0)
        return a;
        return GCD(b,a%b);
    }

    public static void main(String[] args)
    {
        FastReader sc=new FastReader();
        try{

                int t=sc.nextInt();
                while(t-->0){
                int n=sc.nextInt();
                int k=sc.nextInt();

                int a[]=new int[n];
                for(int i=0;i<n;i++){
                    a[i]=sc.nextInt();
                }
                long ans=0;
                Arrays.parallelSort(a);
                for(int i=0;i<10000;i++) {
                	for(int j=1;j<n;j++) {
                		if(a[0]+a[j]>k)
                			continue;
                		else
                		{
                			a[j]+=a[0];
                			ans++;
                		}
                	}
                }
                System.out.println(ans);

                }

        }catch(Exception e){
            return;
        }
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;
import java.util.*;

public class copy_paste
{
    //By shwetank_verma
    static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
    static int mod=1000000007;
    static boolean primes[]=new boolean[1000007];

    static boolean seive(int n){
        Arrays.fill(primes,true);
        primes[0]=primes[1]=false;
        for(int i=2;i*i<=n;i++){
            if(primes[i]==true){
                for(int p=i*i;p<=n;p+=i){
                    primes[p]=false;
                }
            }
        }
        if(n<1000007){
            return primes[n];
        }
        return false;

    }
    static int gcd(int a,int b){
        if(b==0)
        return a;
        return gcd(b,a%b);
    }
    static long GCD(long a,long b){
        if(b==0)
        return a;
        return GCD(b,a%b);
    }

    public static void main(String[] args)
    {
        FastReader sc=new FastReader();
        try{

                int t=sc.nextInt();
                while(t-->0){
                int n=sc.nextInt();
                int k=sc.nextInt();

                int a[]=new int[n];
                for(int i=0;i<n;i++){
                    a[i]=sc.nextInt();
                }
                int ans=0;
                Arrays.parallelSort(a);
                for(int i=0;i<n;i++) {
                	for(int j=1;j<n;j++) {
                		if(a[0]+a[j]>k)
                			continue;
                		else
                		{
                			a[j]+=a[0];
                			ans++;
                		}
                	}
                }
                System.out.println(ans);

                }

        }catch(Exception e){
            return;
        }
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;
import java.util.*;

public class copy_paste
{
    //By shwetank_verma
    static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
    static int mod=1000000007;
    static boolean primes[]=new boolean[1000007];

    static boolean seive(int n){
        Arrays.fill(primes,true);
        primes[0]=primes[1]=false;
        for(int i=2;i*i<=n;i++){
            if(primes[i]==true){
                for(int p=i*i;p<=n;p+=i){
                    primes[p]=false;
                }
            }
        }
        if(n<1000007){
            return primes[n];
        }
        return false;

    }
    static int gcd(int a,int b){
        if(b==0)
        return a;
        return gcd(b,a%b);
    }
    static long GCD(long a,long b){
        if(b==0)
        return a;
        return GCD(b,a%b);
    }

    public static void main(String[] args)
    {
        FastReader sc=new FastReader();
        try{

                int t=sc.nextInt();
                while(t-->0){
                int n=sc.nextInt();
                int k=sc.nextInt();

                int a[]=new int[n];
                for(int i=0;i<n;i++){
                    a[i]=sc.nextInt();
                }
                int ans=0;
                for(int i=0;i<3*n;i++) {
                	Arrays.parallelSort(a);
                	if(a[0]+a[1]>k)
                		break;
                	else {
                		a[1]=a[0]+a[1];
                		ans++;
                	}
                }
                System.out.println(ans);

                }

        }catch(Exception e){
            return;
        }
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;
import java.util.*;

public class copy_paste
{
    //By shwetank_verma
    static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
    static int mod=1000000007;
    static boolean primes[]=new boolean[1000007];

    static boolean seive(int n){
        Arrays.fill(primes,true);
        primes[0]=primes[1]=false;
        for(int i=2;i*i<=n;i++){
            if(primes[i]==true){
                for(int p=i*i;p<=n;p+=i){
                    primes[p]=false;
                }
            }
        }
        if(n<1000007){
            return primes[n];
        }
        return false;

    }
    static int gcd(int a,int b){
        if(b==0)
        return a;
        return gcd(b,a%b);
    }
    static long GCD(long a,long b){
        if(b==0)
        return a;
        return GCD(b,a%b);
    }

    public static void main(String[] args)
    {
        FastReader sc=new FastReader();
        try{

                int t=sc.nextInt();
                while(t-->0){
                int n=sc.nextInt();
                int k=sc.nextInt();

                int a[]=new int[n];
                for(int i=0;i<n;i++){
                    a[i]=sc.nextInt();
                }
                int ans=0;
                for(int i=0;;i++) {
                	Arrays.parallelSort(a);
                	if(a[0]+a[1]>k)
                		break;
                	else {
                		a[1]=a[0]+a[1];
                		ans++;
                	}
                }
                System.out.println(ans);

                }

        }catch(Exception e){
            return;
        }
    }
}


//package codeforcesQuestions;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;
public class cdf673a
{
	static void merge(int arr[], int l, int m, int r)
    {
        int n1 = m - l + 1;
        int n2 = r - m;
        int L[] = new int [n1];
        int R[] = new int [n2];
        for (int i=0; i<n1; ++i)
            L[i] = arr[l + i];
        for (int j=0; j<n2; ++j)
            R[j] = arr[m + 1+ j];
        int i = 0, j = 0;
        int k = l;
        while (i < n1 && j < n2)
        {
            if (L[i] <= R[j])
            {
                arr[k] = L[i];
                i++;
            }
            else
            {
                arr[k] = R[j];
                j++;
            }
            k++;
        }
        while (i < n1)
        {
            arr[k] = L[i];
            i++;
            k++;
        }
        while (j < n2)
        {
            arr[k] = R[j];
            j++;
            k++;
        }
    }
    static void sort(int arr[], int l, int r)
    {
        if (l < r)
        {
            int m = (l+r)/2;
            sort(arr, l, m);
            sort(arr , m+1, r);
            merge(arr, l, m, r);
        }
    }
    public static int lowerBound(int[] array, int length, int value)
	{
        int low = 0;
        int high = length;
        while (low < high)
        {
            final int mid = (low + high) / 2;
            //checks if the value is less than middle element of the array
            if (value <= array[mid])
            {
                high = mid;
            }
            else
            {
                low = mid + 1;
            }
        }
        return low;
    }
	public static int upperBound(int[] array, int length, int value)
	{
        int low = 0;
        int high = length;
        while (low < high) {
            final int mid = (low + high) / 2;
            if (value >= array[mid]) {
                low = mid + 1;
            } else {
                high = mid;
            }
        }
        return low;
    }
    static int gcd(int a, int b)
    {
      if (b == 0)
        return a;
      return gcd(b, a % b);
    }
    static long power(long n,long m)
    {
    	if(m==0)
    		return 1;
    	long ans=1;
    	while(m>0)
    	{
    		ans=ans*n;
    		m--;
    	}
    	return ans;
    }
    static int BinarySearch(int arr[], int x)
    {
        int l = 0, r = arr.length - 1;
        while (l <= r) {
            int m = l + (r - l) / 2;
            if (arr[m] == x)
                return m;
            if (arr[m] < x)
                l = m + 1;
            else
                r = m - 1;
        }
        return -1;
    }
	public static void main(String args[])throws Exception
	{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		int t=Integer.parseInt(br.readLine());
	    for(int i=1;i<=t;i++)
	    {
	    	String s=br.readLine();
	        String str1[]=s.split(" ");
	        int n=Integer.parseInt(str1[0]);
	        int k=Integer.parseInt(str1[1]);
	        int arr[]=new int[n];
	        s=br.readLine();
	        String str[]=s.split(" ");
	        for(int j=0;j<n;j++)
	        arr[j]=Integer.parseInt(str[j]);
	        sort(arr,0,n-1);
	        int ans=0;
	        for(int j=1;j<n;j++)
	        	ans+=(k-arr[j])/arr[0];
	        System.out.println(ans);
	    }
	}
}


#include <iostream>
#include <cmath>
#include <vector>

using namespace std;

int main() {

    int numIter;
    cin>>numIter;
    cout<<endl;

    while(numIter--){

        int numPiles, maxCandies, totalCopy = 0;
        cin>>numPiles>>maxCandies;
        vector<int> numCandies(numPiles);

        for(int i =0; i<numPiles; i++)
            cin>>numCandies[i];

        sort(numCandies.begin(), numCandies.end());
        int smallestEl = numCandies[0];
        numCandies.erase(numCandies.begin());

        for(auto el: numCandies) {
            el = maxCandies - el;
            el = floor(el/smallestEl);
            totalCopy += el;
        }

        cout<<totalCopy<<endl;
    }

    return 0;
}


#include <iostream>
#include <cmath>
#include <vector>

using namespace std;

int main() {

    int numIter;
    cin>>numIter;
    cout<<endl;

    while(numIter--){

        int numPiles, maxCandies, totalCopy = 0;
        cin>>numPiles>>maxCandies;
        vector<int> numCandies(numPiles);

        for(int i =0; i<numPiles; i++)
            cin>>numCandies[i];

        sort(numCandies.begin(), numCandies.end());
        int smallestEl = numCandies[0];
        numCandies.erase(numCandies.begin());

        for(auto el: numCandies) {
            el = maxCandies - el;
            el = floor(el/smallestEl);
            totalCopy += el;
        }

        cout<<totalCopy;
    }

    return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main()
{
int t;

cin>>t;

while(t--)
{ int n,k; int ctr=0;
cin>>n>>k;

int b[n];
for(int i=0;i<n;i++)
{
cin>>b[i];
}
sort(b , b+n);
for(int j=1;j<n;j++)
{
ctr=ctr+(k-b[j])/b[0];
}
cout<<ctr<<endl;
}
return 0;
}


#include<iostream>
#include<stdio.h>
#include<stdlib.h>
#include<algorithm>
#include<vector>
#include<string.h>
#include<math.h>
#include<map>
#include<iomanip>
#include<queue>

using namespace std;

using ll = long long;
using ull = unsigned long long;

const int inf = 1234567;

int main(){
	int t;
	cin >> t;
	while(t--){
		int n , k;
		cin >> n >> k;
		vector<int> a(n);
		for(int i = 0; i < n; i++){
			cin >> a[i];
		}
		sort(a.begin() , a.end());
		int ans  = 0;
		for(int i = 1; i < n; i++){
			int d = (k - a[i]) / a[0];
			ans += d;
			//a[i] += d * a[0];
		}
		cout << ans << endl;
	}
	return 0;
}


#include<iostream>
#include<stdio.h>
#include<stdlib.h>
#include<algorithm>
#include<vector>
#include<string.h>
#include<math.h>
#include<map>
#include<iomanip>
#include<queue>

using namespace std;

using ll = long long;
using ull = unsigned long long;

const int inf = 1234567;

int main(){
	int t;
	cin >> t;
	while(t--){
		int n , k;
		cin >> n >> k;
		vector<int> a(n);
		for(int i = 0; i < n; i++){
			cin >> a[i];
		}
		sort(a.begin() , a.end());
		int ans  = 0;
		bool just = false;
		for(int i = 1; i < n; i++){
			ans += a[i] / a[0];
			if((k - a[i]) % a[0] == 0){
				just = true;
				ans--;
			}
		}
		ans += (k - a[0]) / a[1];
		if((k - a[0]) % a[1] == 0){
			ans--;
			just = true;
		}
		if(just)ans++;
		cout << ans << endl;
	}
	return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main(){
    int N;
    cin >> N;
    while (N--){
        int n;
        cin >> n;
        int k;
        cin >> k;
        vector<int> nums (n);
        for (auto& i : nums) cin >> i;
        sort(nums.begin(), nums.end());
        int res = 0;
        for (int i = 0; i < n; ++i){
            for (int j = 0; j < n; ++j){
                if (i == j || nums[j] > k) continue;
                int temp = (k - nums[j])/nums[i];
                res += temp;
                nums[j] += nums[i]*temp;
            }
        }
        cout << res;
    }
    return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main(){
    int N;
    cin >> N;
    while (N--){
        int n;
        cin >> n;
        int k;
        cin >> k;
        vector<int> nums (n);
        for (auto& i : nums) cin >> i;
        sort(nums.begin(), nums.end());
        int res = 0;
        for (int i = 0; i < i; ++i){
            for (int j = 0; j < i; ++j){
                if (nums[j] > k) continue;
                int temp = (k - nums[j])/nums[i];
                res += temp;
                nums[j] += nums[i]*temp;
            }
            for (int j = i+1; j < n; ++j){
                if (nums[j] > k) continue;
                int temp = (k - nums[j])/nums[i];
                res += temp;
                nums[j] += nums[i]*temp;
            }
        }
        cout << res;
    }
    return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main(){
    int N;
    cin >> N;
    while (N--){
        int n;
        cin >> n;
        int k;
        cin >> k;
        vector<int> nums (n);
        for (auto& i : nums) cin >> i;
        sort(nums.begin(), nums.end());
        int res = 0;
        for (int i = 0; i < i; ++i){
            for (int j = 0; j < n; ++j){
                if (nums[j] > k) continue;
                int temp = (k - nums[j])/nums[i];
                res += temp;
                nums[j] += nums[i]*temp;
            }
            for (int j = i+1; j < n; ++j){
                if (nums[j] > k) continue;
                int temp = (k - nums[j])/nums[i];
                res += temp;
                nums[j] += nums[i]*temp;
            }
        }
        cout << res;
    }
    return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main(){
    int N;
    cin >> N;
    while (N--){
        int n;
        cin >> n;
        int k;
        cin >> k;
        vector<int> nums (n);
        for (auto& i : nums) cin >> i;
        sort(nums.begin(), nums.end());
        int res = 0;
        for (int i = 0; i < n; ++i){
            for (int j = 0; j < n; ++j){
                if (i == j || nums[j] > k) continue;
                int temp = (k - nums[j])/nums[i];
                res += temp;
                nums[j] += nums[i]*temp;
            }
        }
        cout << res << endl;
    }
    return 0;
}


var t = parseInt(readline());
while(t-- > 0) {
  var nk = readline().split(' ');
  var n = parseInt(nk[0]);
  var k = parseInt(nk[1]);
  var a = readline().split(' ').map(x => parseInt(x));
  var smallest = 0;
  var output = 0;
  for (var i = 1; i < n; i ++) {
    if (a[smallest] > a[i]) smallest = i;
  }
  for (var i = 0; i < n; i ++) {
    if (i !== smallest) {
      output += Math.floor((k - a[i]) / a[smallest]);
    }
  }
  print(output);
}


#include <bits/stdc++.h>
using namespace std;

int main()
{
     int t;
     cin>>t;
     while(t--){
      int n,i,k;
      cin>>n>>k;
      int s;
      int s1=0;
      int a[n];
      for(i=0; i<n; i++){
          cin>>a[i];
      }
      sort(a,a+n);
      for(i=n-1; i>0; i--){
         s = k-a[i];
         s = s/a[0];
         s1 = s1 +s;
      }
      cout<<s1<<endl;
     }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main()
{
    int t;
    cin>>t;
    while(t--){
		int s=0;
        int n,k,i;
        cin>>n>>k;
        int a[n];
        int b[n];
        for(i=0; i<n; i++){
            cin>>a[i];
        }
        sort(a,a+n);
        int m = a[0];
        int j=0;

          if((k-a[n])<=a[0]){
              cout<<"1"<<endl;
              break;
          }
    else{
        for(i=1; i<n; i++){
           b[j]= k-a[i];
           j++;
        }
         for(i=0; i<n-1; i++){
         s = s + b[i];
        }
        cout<<s/m<<endl;}
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main()
{
    int t;
    cin>>t;
    while(t--){
		int s=0;
        int n,k,i;
        cin>>n>>k;
        int a[n];
        int b[n];
        for(i=0; i<n; i++){
            cin>>a[i];
        }
        sort(a,a+n);
        int m = a[0];
        int j=0;

          if((k-a[n])<=a[0]){
              cout<<"1"<<endl;

          }
    else{
        for(i=1; i<n; i++){
           b[j]= k-a[i];
           j++;
        }
         for(i=0; i<n-1; i++){
         s = s + b[i];
        }
        cout<<s/m<<endl;}
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
int main()
{
// #ifndef ONLINE_JUDGE
//  freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
// #endif
int t;
cin>>t;
while(t--)
{int a,k;
cin>>a>>k;
multiset <int>st;
for (int i = 0; i < a; ++i)
{
	int d;
	cin>>d;
	st.insert(d);
}
auto itr=st.end();

int kt=0;
itr--;
while(*itr<=k) {
   kt++;
   auto ktr=st.begin();
   ktr++;
   int g=*ktr+*st.begin();
   st.erase(ktr);
   st.insert(g);
    itr=st.end();
    itr--;

}
cout<<kt-1<<"\n";}
return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
int main()
{
#ifndef ONLINE_JUDGE
 freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
#endif
int t;
cin>>t;
while(t--)
{int n,k;
cin>>n>>k;
multiset<int>s;
for (int i = 0; i < n; ++i)
{
	int r;
	cin>>r;
	s.insert(r);
}
int count=0;
while(1)
{
int a=*s.begin();
s.erase(s.begin());
auto itr=s.end();
itr--;
if (*(itr)<=k)
{
	int b=*s.begin();
	s.erase(s.begin());
	s.insert(a+b);
	s.insert(a);
}
else{
	break;
}
count++;
}
cout<<count-1<<"\n";}
return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
int main()
{
// #ifndef ONLINE_JUDGE
//  freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
// #endif
 int t;
 cin>>t;
 while(t--) {
int a,b;
cin>>a>>b;
int arr[a];
for (int i = 0; i < a; ++i)
{
	cin>>arr[i];
}
sort(arr,arr+a);
int k=arr[0];
int r=0;
for (int i = 1; i < a; ++i)
{
	r+=(b-arr[i])/k;
}
cout<<r<<"\n";
 }

return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
int main()
{
#ifndef ONLINE_JUDGE
 freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
#endif
int t;
cin>>t;
while(t--)
{int n,k;
cin>>n>>k;
multiset<int>s;
for (int i = 0; i < n; ++i)
{
	int r;
	cin>>r;
	s.insert(r);
}
int count=0;
while(1)
{
int a=*s.begin();
s.erase(s.begin());
auto itr=s.end();
itr--;
if (*(itr)<=k)
{
	int b=*s.begin();
	s.erase(s.begin());
	s.insert(a+b);
	s.insert(a);
}
else{
	break;
}
count++;
}
cout<<count<<"\n";}
return 0;
}


#include<bits/stdc++.h>
using namespace std;

void solve();

int main()
{
  int T;
cin>>T;
 while(T--)
solve();
return 0;
}

void solve()
{
    int n,k;
    cin>>n>>k;
    vector<int>arr;
    for(int i = 0; i<n; i++)
    {
        int p;
        cin>>p;
        arr.push_back(p);
    }

    int count = 0;
     sort(arr.begin(),arr.end());
    int min = arr[0];
    int i=1;
    while(i!=n)
    {
        count+=(k-arr[i])/min;
        i++;
    }
    cout<<count<<endl;
}


#include<bits/stdc++.h>
using namespace std;

void solve();

int main()
{
  int T;
cin>>T;
 while(T--)
solve();
return 0;
}

void solve()
{
    int n,k;
    cin>>n>>k;
    vector<int>arr;
    for(int i = 0; i<n; i++)
    {
        int p;
        cin>>p;
        arr.push_back(p);
    }

    int count = 0;
     sort(arr.begin(),arr.end());
    while(arr[0]+arr[1]<=k)
    {
        arr[1]+=arr[0];
        count++;
       sort(arr.begin(),arr.end());

    }
    cout<<count<<endl;
}


// chrono::system_clock::now().time_since_epoch().count()
#include<bits/stdc++.h>

#define pb push_back
#define eb emplace_back
#define mp make_pair
#define fi first
#define se second
#define all(x) (x).begin(), (x).end()
#define debug(x) cerr << #x << " = " << x << endl;

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;

const int MAXN = (int)1e3 + 5;

int n, k;
int arr[MAXN];

void solve() {
  scanf("%d %d", &n, &k);

  for (int i = 1; i <= n; ++i) {
    scanf("%d", &arr[i]);
  }

  int mn = min_element(arr + 1, arr + n + 1) - arr;
  int ans = 0;

  for (int i = 1; i <= n; ++i) {
    if (i != mn) {
      while (arr[i] + arr[mn] <= k) {
        arr[i] += arr[mn];
        ++ans;
      }
    }
  }

  printf("%d\n", ans);
}

int main() {
  int tt;
  scanf("%d", &tt);

  while (tt--) {
    solve();
  }

  return 0;
}


#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
    ll t;
    cin>>t;
    while(t--)
    {
        ll n,m,i,s=0;
        cin>>n>>m;

        ll A[n];
          for(i=0;i<n;i++)  cin>>A[i];
        for(i=0;i<n;i++)
        {

           for(j=0;j<n;j++)
           {
               if(i!=j && (A[i]+A[j]<=m))
               s++;
           }
        }
        cout<<s<<"\n";
    }
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
    ll t;
    cin>>t;
    while(t--)
    {
        ll n,m,i,j,s=0;
        cin>>n>>m;

        ll A[n];
          for(i=0;i<n;i++)  cin>>A[i];
        for(i=0;i<n;i++)
        {

           for(j=0;j<n;j++)
           {
               if(i!=j && (A[i]+A[j]<=m))
               s++;
           }
        }
        cout<<s<<"\n";
    }
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
    ll t;
    cin>>t;
    while(t--)
    {
        ll n,m,i,j,s=0,x;
        cin>>n>>m;

        ll A[n];
          for(i=0;i<n;i++)
          cin>>A[i];
          sort(A,A+n);
          x=A[0];
        for(i=1;i<n;i++)
        {
            j=m-A[i];
            j=j/x;
            if(j>0)
            s+=j;
        }
        cout<<s<<"\n";
    }
    return 0;
}


#include<iostream>
#include <bits/stdc++.h>
using namespace std;
int main()
{

int t;
cin>>t;

while(t-- > 0)
{
int n;
cin>>n;

int k;
cin>>k;

int* A= new int[n];
for(int i=0;i<n;i++)
{
cin>>A[i];
}

sort(A,A+n);
int count=0;
for(int i=n-1;i>=1;i--)
{
while(A[i]<k)
{
A[i]=A[i]+A[0];
if(A[i]<=k)count++;
}
}

cout<<count<<endl;
delete [] A;
}
}


#include<iostream>
#include <bits/stdc++.h>
using namespace std;
int main()
{

int t;
cin>>t;

while(t-- > 0)
{
int n;
cin>>n;

int k;
cin>>k;

int* A= new int[n];
for(int i=0;i<n;i++)
{
cin>>A[i];
}

sort(A,A+n);
int count=0;
for(int i=n-1;i>=1;i--)
{
while(A[i]<k)
{
A[i]=A[i]+A[0];
if(A[i]<k)count++;
}
}

cout<<count<<endl;
delete [] A;
}
}


#include<iostream>
#include <bits/stdc++.h>
using namespace std;
int main()
{

int t;
cin>>t;

while(t-- > 0)
{
int n;
cin>>n;

int k;
cin>>k;

int* A= new int[n];
for(int i=0;i<n;i++)
{
cin>>A[i];
}

sort(A,A+n);
int count=0;
for(int i=n-1;i>=1;i++)
{
while(A[i]<k)
{
A[i]=A[i]+A[0];
count++;
}
}

cout<<count<<endl;
delete [] A;
}
}


#include<iostream>
#include <bits/stdc++.h>
int main()
{

int t;
cin>>t;

while(t-- > 0)
{
int n;
cin>>n;

int k;
cin>>k;

int* A= new int[n];
for(int i=0;i<n;i++)
{
cin>>A[i];
}

sort(A,A+n);
int count=0;
for(int i=n-1;i>=1;i++)
{
while(A[i]<K)
{
A[i]=A[i]+A[0];
count++;
}
}

cout<<count<<endl;
delete [] A;
}
}


#include<iostream>
#include <bits/stdc++.h>
using namespace std;
int main()
{

int t;
cin>>t;

while(t-- > 0)
{
int n;
cin>>n;

int k;
cin>>k;

int* A= new int[n];
for(int i=0;i<n;i++)
{
cin>>A[i];
}

sort(A,A+n);
int count=0;
for(int i=n-1;i>=1;i++)
{
while(A[i]<K)
{
A[i]=A[i]+A[0];
count++;
}
}

cout<<count<<endl;
delete [] A;
}
}


#include<iostream>
#include <bits/stdc++.h>
using namespace std;
int main()
{

int t;
cin>>t;

while(t-- > 0)
{
int n;
cin>>n;

int k;
cin>>k;

int* A= new int[n];
for(int i=0;i<n;i++)
{
cin>>A[i];
}

sort(A,A+n);
int count=0;
for(int i=n-1;i>=1;i--)
{
while(A[i]<k)
{
A[i]=A[i]+A[0];
count++;
}
}

cout<<count<<endl;
delete [] A;
}
}


#include <bits/stdc++.h>
using namespace std;
const int N=1e4+10;
int a[N];
int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int n,k;
        int sum=0;
        cin>>n>>k;
        for(int i=1;i<=n;i++)
        {
            cin>>a[i];
        }
        sort(a+1,a+n+1);
       // t=a[1];
        for(int i=2;i<=n;i++)
        {
            a[i]+=a[1];
            while(a[i]<=k)
            {
                sum++;
                a[i]+=a[1];
            }
        }
        cout<<sum<<endl;
    }
}


#include <bits/stdc++.h>
using namespace std;
const int N=1e4+10;
int a[N];
int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int n,k;
        int sum=0;
        cin>>n>>k;
        for(int i=1;i<=n;i++)
        {
            cin>>a[i];
        }
        sort(a+1,a+n+1);
        t=a[1];
        for(int i=2;i<=n;i++)
        {
            a[i]+=t;
            while(a[i]<=k)
            {
                sum++;
                a[i]+=t;
            }
        }
        cout<<sum<<endl;
    }
}


#include <bits/stdc++.h>
using namespace std;
const int N=1e4+10;
int a[N];
int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int n,k;
        cin>>n>>k;
        for(int i=1; i<=n; i++)
        {
            cin>>a[i];
        }
        sort(a+1,a+n+1);
        int sum=0;
        for(int i=2; i<=n; i++)
        {
            if(a[i]<k)
            {
                sum+=((k-a[i])/a[1]);
            }
        }
        cout<<sum<<endl;
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
const int N=1e4+10;
int a[N];
int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int n,k;
        int sum=0;
        cin>>n>>k;
        for(int i=1;i<=n;i++)
        {
            cin>>a[i];
        }
        sort(a+1,a+n+1);
        t=a[1];
        for(int i=2;i<=n;i++)
        {
           if(a[i]<k)
           {
               sum+=(k-a[i])/t;
           }
        }
        cout<<sum<<endl;
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int func(vector<int> &vec,int k){
    long count=0;
    sort(vec.begin(),vec.end());
    int n=vec.size();
    for(int i=n-1;i>=1;i--){
        if(k>=vec[i]){
            int y=floor((k-vec[i])/vec[0]);
            count+=y;
            vec[i]+=y*vec[0];
        }
    }
    if(n>=2){
        if(k>=vec[0])count+=floor((k-vec[0])/vec[1]);
    }
    return count;
}

int main(){
    int tot;
    cin>>tot;
    while(tot){
        int n,k;
        cin>>n>>k;
        vector<int> vec(n);
        while(n){
            cin>>vec[n-1];
            n--;
        }
        cout<<func(vec,k)<<"\n";
        tot--;
    }
    return 1;
}


#include <bits/stdc++.h>

using namespace std;

int func(vector<int> &vec,int k){
    long count=0;
    sort(vec.begin(),vec.end());
    int n=vec.size();
    for(int i=n-1;i>=1;i--){
        if(k>=vec[i]){
            int y=floor((k-vec[i])/vec[0]);
            count+=y;
            vec[i]+=y*vec[0];
        }
    }
    if(n>=2){
        if(k>=vec[0])count+=floor((k-vec[0])/vec[1]);
    }
    return count;
}

int main(){
    int tot;
    cin>>tot;
    while(tot){
        int n,k;
        cin>>n>>k;
        vector<int> vec(n);
        while(n){
            cin>>vec[n-1];
            n--;
        }
        cout<<func(vec,k);
        tot--;
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;
int func(vector<int> &vec,int k){
    long count=0;
    sort(vec.begin(),vec.end());
    int n=vec.size();
    for(int i=n-1;i>=1;i--){
        if(k>=vec[i]){
            int y=floor((k-vec[i])/vec[0]);
            count+=y;
            vec[i]+=y*vec[0];
        }
    }
    if(n>=2){
        if(k>=vec[0])count+=floor((k-vec[0])/vec[1]);
    }
    return count;
}

int main(){
    int tot;
    cin>>tot;
    while(tot){
        int n,k;
        cin>>n>>k;
        vector<int> vec(n);
        while(n){
            cin>>vec[n-1];
            n--;
        }
        cout<<func(vec,k)<<"\n";
        tot--;
    }
    return 1;
}


#include <bits/stdc++.h>

using namespace std;
int func(vector<int> &vec,int k){
    long count=0;
    sort(vec.begin(),vec.end());
    int n=vec.size();
    for(int i=n-1;i>=1;i--){
        if(k>=vec[i]){
            int y=floor((k-vec[i])/vec[0]);
            count+=y;
            vec[i]+=y*vec[0];
        }
    }
    if(n>=2){
        if(k>=vec[0])count+=floor((k-vec[0])/vec[1]);
    }
    return count;
}

int main(){
    int tot;
    cin>>tot;
    while(tot--){
        int n,k;
        cin>>n>>k;
        vector<int> vec(n);
        while(n--){
            cin>>vec[n-1];
        }
        cout<<func(vec,k)<<"\n";
    }
    return 1;
}


#include <bits/stdc++.h>

int func(vector<int> &vec,int k){
    long count=0;
    sort(vec.begin(),vec.end());
    int n=vec.size();
    for(int i=n-1;i>=1;i--){
        if(k>=vec[i]){
            int y=floor((k-vec[i])/vec[0]);
            count+=y;
            vec[i]+=y*vec[0];
        }
    }
    if(n>=2){
        if(k>=vec[0])count+=floor((k-vec[0])/vec[1]);
    }
    return count;
}

int main(){
    int tot;
    cin>>tot;
    while(tot--){
        int n,k;
        cin>>n>>k;
        vector<int> vec(n);
        while(n--){
            cin>>vec[n-1];
        }
        cout<<func(vec,k)<<"\n";
    }
    return 1;
}


#include <bits/stdc++.h>

using namespace std;

int func(vector<int> &vec,int k){
    long count=0;
    sort(vec.begin(),vec.end());
    int n=vec.size();
    for(int i=n-1;i>=1;i--){
        if(k>=vec[i]){
            int y=floor((k-vec[i])/vec[0]);
            count+=y;
            vec[i]+=y*vec[0];
        }
    }
    if(n>=2){
        if(k>=vec[0])count+=floor((k-vec[0])/vec[1]);
    }
    return count;
}

int main(){
    int tot;
    cin>>tot;
    while(tot){
        int n,k;
        cin>>n>>k;
        vector<int> vec(n);
        while(n){
            cin>>vec[n-1];
            n--;
        }
        cout<<func(vec,k)<<"\n";
        tot--;
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int func(vector<int> &vec,int k){
    long count=0;
    sort(vec.begin(),vec.end());
    int n=vec.size();
    for(int i=n-1;i>=1;i--){
        if(k>=vec[i]){
            int y=floor((k-vec[i])/vec[0]);
            count+=y;
            vec[i]+=y*vec[0];
        }
    }
    if(n>=2){
        if(k>=vec[0])count+=floor((k-vec[0])/vec[1]);
    }
    return count;
}

int main(){
    int tot;
    cin>>tot;
    while(tot){
        int n,k;
        cin>>n>>k;
        vector<int> vec(n);
        while(n){
            cin>>vec[n-1];
            n--;
        }
        cout<<func(vec,k);
        tot--;
    }
    return 1;
}


#include<iostream>
	#include<vector>
	#include<set>
	#include<algorithm>
	#include<map>
	#include<cmath>
	#include<cstring>
	#include<queue>
	using namespace std;
	using ll = long long;
	#define N 1000000007
	#define FastIO ios_base::sync_with_stdio(false);cin.tie(NULL); cout.tie(NULL);

	void solve() {
		int n, k, temp;
		cin>>n>>k;
		int a[n];
		for(int i=0; i<n; i++) {
			cin>>a[i];
		}

		ll count = 0;
		while(true) {
			sort(a, a+n);
			int i=n-1;
			for(; i>0; i--) {
				if(a[0]+a[i] <= k) {
					a[i]+=a[0];
					count++;
					break;
				}
			}

			if(i == 0) {
				break;
			}

		}
		cout<<count<<"\n";

	}

	int main() {
		FastIO;
// 		freopen("input.txt", "r", stdin);
// 		freopen("output.txt", "w", stdout);
// 		freopen("error", "w", stderr);
		int t;
		cin>>t;
		while(t--) {
			solve();
		}

	}


#include<iostream>
#include<vector>
#include<set>
#include<algorithm>
#include<map>
#include<cmath>
#include<cstring>
#include<queue>
using namespace std;
using ll = long long;
#define N 1000000007
#define FastIO ios_base::sync_with_stdio(false);cin.tie(NULL); cout.tie(NULL);

void solve() {
	int n, k;
	cin>>n>>k;
	int a[n], mini = 100000, index = 0;
	for(int i = 0; i<n; i++) {
		cin>>a[i];
		if(mini > a[i]) {
			mini = a[i];
			index = i;
		}
	}
	int ans = 0;

	for(int i=0; i<n;i++) {
		if(i!=index) {
			ans+=(k-a[i])/a[index];
		}
	}

	cout<<ans<<"\n";

}

int main() {
	FastIO;
// 	freopen("input.txt", "r", stdin);
// 	freopen("output.txt", "w", stdout);
// 	freopen("error", "w", stderr);
	int t;
	cin>>t;
	while(t--) {
		solve();
	}

}


#include<iostream>
#include<vector>
#include<set>
#include<algorithm>
#include<map>
#include<cmath>
#include<cstring>
#include<queue>
using namespace std;
using ll = long long;
#define N 1000000007
#define FastIO ios_base::sync_with_stdio(false);cin.tie(NULL); cout.tie(NULL);

int bin(int a[], int n, int k) {
	int low = 1, high = n-1;
	int mid = low;
	while(low < high) {
		mid = low+(high - low)/2;
		if(a[0]+a[mid] > k) {
			high = mid-1;
		}
		else if(a[0] + mid < k) {
			low = mid+1;
		}
		else {
			break;
		}
	}

	if(a[0]+a[mid] > k) {
		mid = -1;
	}

	return mid;
}

void solve() {
	int n, k, temp;
	cin>>n>>k;
	int a[n];
	for(int i=0; i<n; i++) {
		cin>>a[i];
	}

	ll count = 0;
	while(true) {
		sort(a, a+n);
		int p = bin(a, n, k);

		if(p == -1) {
			break;
		}
		a[p]+=a[0];
		count++;

	}
	cout<<count<<"\n";

}

int main() {
	FastIO;
// 	freopen("input.txt", "r", stdin);
// 	freopen("output.txt", "w", stdout);
// 	freopen("error", "w", stderr);
	int t;
	cin>>t;
	while(t--) {
		solve();
	}

}


#include <bits/stdc++.h>

using namespace std;

int main()
{
   int t;

   cin >> t;

   //vector<int> n[t];
   //vector <int> k[t];
   vector <int> answers;
   int n,k,element;
   bool ima_jos = true;

   for (int i = 0; i < t; i++) {
       int broj = 0;
       vector <int> arr;
       cin >> n >> k;
       //cout << k << endl;
       for (int i = 0; i < n; i++) {
           cin >> element;
           arr.push_back(element);
       }

       sort(arr.begin(), arr.end());
       //cout << arr[1];

       for (int j = 0; j < n; j++) {
           for (int m = 1; m < n; m++) {
               if ((arr[m] + arr[0]) <= k) {
                   arr[m] += arr[0];
                   //cout << arr[m] << endl;
                   broj++;
               }
           }
       }
       answers.push_back(broj);
   }

   for (int i = 0; i < answers.size(); i++) {
       cout << answers[i] << " ";
   }
   return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
   int t;

   cin >> t;

   //vector<int> n[t];
   //vector <int> k[t];
   vector <int> answers;
   int n,k,element;
   bool ima_jos = true;

   for (int i = 0; i < t; i++) {
       int broj = 0;
       vector <int> arr;
       cin >> n >> k;
       //cout << k << endl;
       for (int i = 0; i < n; i++) {
           cin >> element;
           arr.push_back(element);
       }

       sort(arr.begin(), arr.end());
       //cout << arr[1];

       for (int j = 0; j < n; j++) {
           for (int m = 1; m < n; m++) {
               if ((arr[m] + arr[0]) <= k) {
                   arr[m] += arr[0];
                   cout << arr[m] << endl;
                   broj++;
               }
           }
       }
       answers.push_back(broj);
   }

   for (int i = 0; i < answers.size(); i++) {
       cout << answers[i] << " ";
   }
   return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
   int t;

   cin >> t;

   //vector<int> n[t];
   //vector <int> k[t];
   vector <int> answers;
   int n,k,element;

   for (int i = 0; i < t; i++) {
       int broj = 0;
       vector <int> arr;
       cin >> n >> k;
       //cout << k << endl;
       for (int i = 0; i < n; i++) {
           cin >> element;
           arr.push_back(element);
       }

       sort(arr.begin(), arr.end());
       //cout << arr[1];

        for (int m = 1; m < n; m++) {
            while (arr[m] + arr[0] <= k) {
                arr[m] += arr[0];
                //cout << arr[m] << endl;
                broj++;
            }
        }
       answers.push_back(broj);
   }

   for (int i = 0; i < answers.size(); i++) {
       cout << answers[i] << endl;
   }
   return 0;
}


#include<bits/stdc++.h>
#include <cmath>
using namespace std;
typedef long long int ll;
int main()
{
    ll t;
    cin>>t;
    while(t--)
    {
        int x,y,n,k;
        cin>>n>>k;
        vector<int>arr(n);
        for(int i=0;i<n;i++)
        {
            cin>>arr[i];
        }
        sort(arr.begin(),arr.end());
        int sum=0;
        int val=arr[0];
        for(int i=1;i<arr.size();i++)
        {
            sum+=(k-arr[i])/val;
        }
        cout<<sum<<endl;
    }
}


#include<bits/stdc++.h>
#include <cmath>
using namespace std;
typedef long long int ll;
int main()
{
    ll t;
    cin>>t;
    while(t--)
    {
        int x,y,n,k;
        cin>>n>>k;
        vector<int>arr(n);
        for(int i=0;i<n;i++)
        {
            cin>>arr[i];
        }
        sort(arr.begin(),arr.end());
        {
            int count=0;
            bool flag=false;
            while(flag==false)
            {
                arr[1]=arr[0]+arr[1];
                int sval=arr[1];
                if(sval>k)
                {
                    flag=true;
                    break;
                }
                else
                {
                    count++;
                    for(int i=1;i<arr.size()-1;i++)
                    {
                        if(arr[i]>arr[i+1])
                        {
                            swap(arr[i],arr[i+1]);
                        }
                    }
                }
            }
            cout<<count<<endl;
        }
    }
}


#include<bits/stdc++.h>
#include <cmath>
using namespace std;
typedef long long int ll;
int main()
{
    ll t;
    cin>>t;
    while(t--)
    {
        int x,y,n,k;
        cin>>n>>k;
        vector<int>arr(n);
        for(int i=0;i<n;i++)
        {
            cin>>arr[i];
        }
        sort(arr.begin(),arr.end());
        if(arr[0]+arr[1]>k)
        {
            cout<<0<<endl;
        }
        else
        {
            int count=0;
            bool flag=false;
            while(flag==false)
            {
                arr[1]=arr[0]+arr[1];
                int sval=arr[1];
                if(sval>k)
                {
                    flag=true;
                    break;
                }
                else
                {
                    count++;
                    for(int i=1;i<arr.size()-1;i++)
                    {
                        if(arr[i]>arr[i+1])
                        {
                            swap(arr[i],arr[i+1]);
                            break;
                        }
                    }
                }
            }
            cout<<count<<endl;
        }
    }
}


#include<iostream>
#include<string>
using namespace std;
int main()
{
    int i,t,n,k,x,y,j,dem,tam;
    int a[1000]={};
    cin >> t;
    for (i=1; i<=t; i++)
    {
        cin >> n >> k;
        dem = 0;
        for (j=0; j<n; j++)
        {
            cin >> a[j];
        }
        for (x=0; x<n-1; x++)
        {
            for (y=x+1; y<n; y++)
            if (a[y]<=a[x])
            {
                tam = a[x];
                a[x] = a[y];
                a[y] = tam;
            }
        }
        for (j=1; j<n; j++)
        {
           while ((a[j]+a[0])<=k)
           {
               a[j] = a[j] + a[0];
               dem = dem + 1;
           }
        }
        for (j=1; j<n; j++)
        {
            if ((a[0]+a[j])<=k)
            {
                a[0] = a[0] + a[j];
                dem =dem + 1;
            }
        }
        cout << dem << endl;
    }
    return 0;
}


#include<iostream>
using namespace std;
int main()
{
    int i,t,n,k,x,y,j,dem,tam;
    int a[1000]={};
    cin >> t;
    for (i=1; i<=t; i++)
    {
        cin >> n >> k;
        dem = 0;
        for (j=1; j<=n; j++)
        {
            cin >> a[j];
        }
        for (x=0; x<n-1; x++)
        {
            for (y=x+1; y<n; y++)
            if (a[y]<=a[x])
            {
                tam = a[x];
                a[x] = a[y];
                a[y] = tam;
            }
        }
        for (j=1; j<n; j++)
        {
           dem = dem + (k-a[j])/a[0];
        }
        cout << dem << endl;
    }
    return 0;
}


#include<iostream>
using namespace std;
int main()
{
    int i,t,n,k,x,y,j,dem,tam;
    int a[1000]={};
    cin >> t;
    for (i=1; i<=t; i++)
    {
        cin >> n >> k;
        dem = 0;
        for (j=1; j<=n; j++)
        {
            cin >> a[j];
        }
        for (x=0; x<n-1; x++)
        {
            for (y=x+1; y<n; y++)
            if (a[y]<=a[x])
            {
                tam = a[x];
                a[x] = a[y];
                a[y] = tam;
            }
        }
        for (j=1; j<n; j++)
        {
            while ((a[j]+a[0])<=k)
            {
                a[j] = a[j] + a[0];
                dem = dem +1;
            }
        }
        cout << dem << endl;
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
const int N = 1e5+10;
int a[N];
int main() {
	int t;
	cin>>t;
	while(t--) {
		int n,k;
		cin>>n>>k;
		for(int i=0;i<n;i++) {
			cin>>a[i];
		}
		sort(a,a+n);
		int sum=0;
		for(int i=1;i<n;i++) {
			if(k>=a[i])
			sum+=k-a[i];
		}
		int ans=0;
		ans = sum/a[0];
		cout<<ans<<endl;
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
const int N = 1e5+10;
int a[N];
int main() {
	int t;
	cin>>t;
	while(t--) {
		int n,k;
		cin>>n>>k;
		for(int i=0;i<n;i++) {
			cin>>a[i];
		}
		int f=0;
		sort(a,a+n);
		int sum=0;
		for(int i=1;i<n;i++) {
			if(k>=a[i])
			sum+=k-a[i];
			else {
				f=1;
			}
		}
		if(f==1) {
			cout<<0<<endl;
			continue;
		}
		int ans=0;
		ans = sum/a[0];
		cout<<ans<<endl;
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1e5+10;
ll a[N];
int main() {
	int t;
	cin>>t;
	while(t--) {
		ll n,k;
		cin>>n>>k;
		for(int i=0;i<n;i++) {
			cin>>a[i];
		}
		sort(a,a+n);
		ll sum=0;
		for(int i=1;i<n;i++) {
			if(k>a[i])
			sum+=(k-a[i])/a[0];
	}
		cout<<sum<<endl;
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
const int N = 1e5+10;
int a[N];
int main() {
	int t;
	cin>>t;
	while(t--) {
		int n,k;
		cin>>n>>k;
		for(int i=0;i<n;i++) {
			cin>>a[i];
		}

		sort(a,a+n);
		int sum=0;
		for(int i=1;i<n;i++) {
			if(k>=a[i])
			sum+=k-a[i];
			else {
				cout<<0<<endl;
				return 0;
			}
		}
		int ans=0;
		ans = sum/a[0];
		cout<<ans<<endl;
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1e5+10;
ll a[N];
int main() {
	int t;
	cin>>t;
	while(t--) {
		ll n,k;
		cin>>n>>k;
		for(int i=0;i<n;i++) {
			cin>>a[i];
		}
		int f=0;
		sort(a,a+n);
		ll sum=0;
		for(int i=1;i<n;i++) {
			if(k>a[i])
			sum+=(k-a[i])/a[0];
			else {
				f=1;
				break;
			}
		}
		if(f==1) {
			cout<<0<<endl;
			continue;
		}

		cout<<sum<<endl;
	}
	return 0;
}


#include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <sstream>
#include <stack>
#include <vector>
typedef long long ll;
using namespace std;
int main()
{
    int t;
    cin >> t;
    while (t--)
    {
        int n, k;
        cin >> n >> k;
        int arr[1000];
        for (int i = 0; i < n; i++)
            cin >> arr[i];
        sort(arr, arr + n);
        int count = 0;
        //cout<<"why bastard";
        while (1)
        {
            if ((arr[1] + arr[0]) > k)
            {
                break;
            }
            arr[1] += arr[0];
            sort(arr, arr + n);
            count++;
        }
        cout << count << endl;
    }
}


#include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <sstream>
#include <stack>
#include <vector>
typedef long long ll;
using namespace std;
int main()
{
    int t;
    cin >> t;
    while (t--)
    {
        int n, k;
        cin >> n >> k;
        int arr[1000];
        for (int i = 0; i < n; i++)
            cin >> arr[i];
        sort(arr, arr + n);
        int count = 0;
        int i=1;
        while ((arr[i] + arr[0]) <= k)
        {
            arr[i++] += arr[0];
            count++;
            if(i==n)
                i=1;
        }
        cout << count << endl;
    }
}


#include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <sstream>
#include <stack>
#include <vector>
typedef long long ll;
using namespace std;
int main()
{
    int t;
    cin >> t;
    while (t--)
    {
        int n, k;
        cin >> n >> k;
        int arr[1000];
        for (int i = 0; i < n; i++)
            cin >> arr[i];
        sort(arr, arr + n);
        int count = 0;
        for(int i =1;i<n;i++){
                count+= (k-arr[i])/arr[0];
        }

        cout << count << endl;
    }
}


#include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <sstream>
#include <stack>
#include <vector>
typedef long long ll;
using namespace std;
int main()
{
    int t;
    cin >> t;
    while (t--)
    {
        int n, k;
        cin >> n >> k;
        int arr[1000];
        for (int i = 0; i < n; i++)
            cin >> arr[i];
        sort(arr, arr + n);
        int count = 0;
        while ((arr[1] + arr[0]) <= k)
        {
            arr[1] += arr[0];
            sort(arr, arr + n);
            count++;
        }
        cout << count << endl;
    }
}


#include<bits/stdc++.h>
using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    freopen("input.txt","r",stdin);

    int t;
    cin >> t;
    while(t>0)
    {
        int n,k;
        cin>>n>>k;
        int arr[n];
        int i;
        for(i=0;i<n;i++)
            cin>> arr[i];
        int mini = INT_MAX;
        int min_pos = 0;
        for(i=0;i<n;i++)
        {
            if(arr[i]<mini)
            {
                mini = arr[i];
                min_pos = i;
            }
        }
        int ans = 0;
        for(i=0;i<n;i++)
        {
            if(i==min_pos)
                continue;
            ans += (k - arr[i])/mini;
        }
        cout << ans << "\n";
        t--;
    }
}


#include<bits/stdc++.h>
using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    int t;
    cin >> t;
    while(t>0)
    {
        int n,k;
        cin>>n>>k;
        int arr[n];
        int i;
        for(i=0;i<n;i++)
            cin>> arr[i];
        int mini = INT_MAX;
        int min_pos = 0;
        for(i=0;i<n;i++)
        {
            if(arr[i]<mini)
            {
                mini = arr[i];
                min_pos = i;
            }
        }
        int ans = 0;
        for(i=0;i<n;i++)
        {
            if(i==min_pos)
                continue;
            ans += (k - arr[i])/mini;
        }
        cout << ans << "\n";
    }
}


#include<bits/stdc++.h>
using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

//    freopen("input.txt","r",stdin);

    int t;
    cin >> t;
    while(t>0)
    {
        int n,k;
        cin>>n>>k;
        int arr[n];
        int i;
        for(i=0;i<n;i++)
            cin>> arr[i];
        int mini = INT_MAX;
        int min_pos = 0;
        for(i=0;i<n;i++)
        {
            if(arr[i]<mini)
            {
                mini = arr[i];
                min_pos = i;
            }
        }
        int ans = 0;
        for(i=0;i<n;i++)
        {
            if(i==min_pos)
                continue;
            ans += (k - arr[i])/mini;
        }
        cout << ans << "\n";
        t--;
    }
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;

void solve(){
	int n, k;
	cin >> n >> k;
	vector<int> a(n);
	for(auto &x : a){
		cin >> x;
	}
	sort(a.begin(), a.end());
	int ans = 0;
	for(int i = 1; i < n; i++){
		ans += (k - a[i])/a[0];
	}
	cout << ans << '\n';
}

int main(){
	ios::sync_with_stdio(false);
	cin.tie(NULL);
	cout<<setprecision(32);

	int t; cin >> t;
	while(t--)solve();

	return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef long double ll;

void solve()
{
  int n,k;
  cin >> n >> k;
  vector<int> arr(n);
  for(auto &i : arr)
  {
    cin >> i;
  }
  sort(arr.begin(),arr.end());
  int result = 0;
  for(int i=1;i<n;i++)
  {
      result += max(0,((k-arr[i])/arr[0]));
  }
  cout << result << endl;
  return;

}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  ll t;
  cin >> t;
  while(t--)
  solve();

  return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef long double ll;

void solve()
{
  int n,k;
  cin >> n >> k;
  vector<int> arr(n);
  for(auto &i : arr)
  {
    cin >> i;
  }
  sort(arr.begin(),arr.end());
  ll result = 0;
  for(int i=1;i<n;i++)
  {
      result += max(0,((k-arr[i])/arr[0]));
  }
  cout << result << endl;
  return;

}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  ll t;
  cin >> t;
  while(t--)
  solve();

  return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;

void solve(){
	int n, k;
	cin >> n >> k;
	vector<int> a(n);
	for(auto &x : a){
		cin >> x;
	}
	sort(a.begin(), a.end());
	int ans = 0;
	for(int i = 1; i < n; i++){
		ans += (k - a[i])/a[0];
	}
	cout << ans << '\n';
}

int main(){
	ios::sync_with_stdio(false);
	cin.tie(NULL);
	cout<<setprecision(32);

	int t; cin >> t;
	while(t--)solve();

	return 0;


#include <bits/stdc++.h>

using namespace std;
typedef long double ll;

void solve()
{
  ll n,k;
  cin >> n >> k;
  vector<ll> arr(n);
  for(auto &i : arr)
  {
    cin >> i;
  }
  ll mini = min_element(arr.begin(),arr.end()) - arr.begin();
  //cout << mini;
  ll result = 0;
  ll temp;
  for(int i=0;i<n;i++)
  {
    if(i != mini)
    {
      temp = k - arr[i];
      result += floor(temp/arr[mini]);
    }
  }
  cout << result << endl;
  return;

}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  ll t;
  cin >> t;
  while(t--)
  solve();

  return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef long double ll;

void solve()
{
  int n,k;
  cin >> n >> k;
  vector<int> arr(n);
  for(auto &i : arr)
  {
    cin >> i;
  }
  sort(arr.begin(),arr.end());
  ll result = 0;
  for(int i=1;i<n;i++)
  {
      result += (k-arr[i])/arr[0];
  }
  cout << result << endl;
  return;

}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  ll t;
  cin >> t;
  while(t--)
  solve();

  return 0;
}


#include<iostream>
using namespace std;

int main(){
	int n,k,i,times,ele=100000,count=0;
	cin>>times;
	while(times--){
		cin>>n>>k;
		int listt[n];
		for(i=0;i<n;i++){
			cin>>listt[i];
			if(listt[i]<ele)
			ele=listt[i];
		}
		sort(listt,listt+n);
		for(i=1;i<n;i++){
			while (listt[i]<=k){
				listt[i]+=ele;
				if (listt[i]<=k)
				count++;
			}
		}
		cout<<count<<endl;
	}
}


//#include<iostream>
#include<bits/stdc++.h>
using namespace std;

int main(){
	int n,k,i,times,ele=100000,count=0;
	cin>>times;
	while(times--){
		cin>>n>>k;
		int listt[n];
		count=0;
		for(i=0;i<n;i++){
			cin>>listt[i];
			if(listt[i]<ele)
			ele=listt[i];
		}
		sort(listt,listt+n);
		for(i=1;i<n;i++){
			while (listt[i]<=k){
				listt[i]+=ele;
				if (listt[i]<=k)
				count++;
			}
		}
		cout<<count<<endl;
	}
}


//#include<iostream>
#include<bits/stdc++.h>
using namespace std;

int main(){
	int n,k,i,times,ele=100000,count=0;
	cin>>times;
	while(times--){
		cin>>n>>k;
		int listt[n];
		for(i=0;i<n;i++){
			cin>>listt[i];
			if(listt[i]<ele)
			ele=listt[i];
		}
		sort(listt,listt+n);
		for(i=1;i<n;i++){
			while (listt[i]<=k){
				listt[i]+=ele;
				if (listt[i]<=k)
				count++;
			}
		}
		cout<<count<<endl;
	}
}


#include<iostream>
//#include<bits/stdc++.h>
using namespace std;

int main(){
	int n,k,i,times,ele=100000,count=0;
	cin>>times;
	while(times--){
		cin>>n>>k;
		int listt[n];
		count=0;
		for(i=0;i<n;i++){
			cin>>listt[i];
			if(listt[i]<ele)
			ele=listt[i];
		}
		sort(listt,listt+n);
		for(i=1;i<n;i++){
			while (listt[i]<=k){
				listt[i]+=ele;
				if (listt[i]<=k)
				count++;
			}
		}
		cout<<count<<endl;
	}
}


//#include<iostream>
#include<bits/stdc++.h>
using namespace std;

int main(){
	int n,k,i,times,ele=100000,count=0;
	cin>>times;
	while(times--){
		cin>>n>>k;
		int listt[n];

		for(i=0;i<n;i++){
			cin>>listt[i];

		}
//		cout<<"Ele"<<ele<<endl;
		sort(listt,listt+n);
		ele=listt[0];
		for(i=1;i<n;i++){
			while (listt[i]<=k){
				listt[i]+=ele;
				if (listt[i]<=k){
				count++;

				}
			}
		}
		cout<<count<<endl;
		count=0;
	}
}


#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <stack>
#include <map>
#include <cstring>
#include <queue>
#include <cstring>
#include <vector>
#include <algorithm>
#define LL long long

using namespace std;
/*
已知直线上的两点P1(X1,Y1) P2(X2,Y2)， P1 P2两点不重合。则直线的一般式方程AX+BY+C=0中，A B C分别等于：
A = Y2 - Y1
B = X1 - X2
C = X2*Y1 - X1*Y2
*/
int maze[1005];
int main()
{
    cin.tie(0);
    cout.tie(0);
    ios::sync_with_stdio(false);

    int T;
    cin>>T;
    int casenum=0;
    while(T--)
    {
        int n,k,min_,min__=0,times=0;
        cin>>n>>k;
        min_=k;
        for(int i=0;i<n;i++)
        {
            cin>>maze[i];
            if(maze[i]<min_)
            {
                min_=maze[i];
                min__=i;
            }
        }

        for(int i=0;i<n;i++)
        {
            if(i==min__)
            {
                continue;
            }
            times+=(k-maze[i])/min_;
        }
        cout<<times<<endl;
    }
    return 0;
}
//cout<<"Case #"<<casenum<<": Yes"<<endl;a(n) = 2*a(n-1) + 3*a(n-2)


#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <stack>
#include <map>
#include <cstring>
#include <queue>
#include <cstring>
#include <vector>
#include <algorithm>
#define LL long long

using namespace std;
/*
已知直线上的两点P1(X1,Y1) P2(X2,Y2)， P1 P2两点不重合。则直线的一般式方程AX+BY+C=0中，A B C分别等于：
A = Y2 - Y1
B = X1 - X2
C = X2*Y1 - X1*Y2
*/
int maze[1005];

long long int s[10000005];
int main()
{
    cin.tie(0);
    cout.tie(0);
    ios::sync_with_stdio(false);

    int T;
    scanf("%d",&T);
    int casenum=0;
    while(T--)
    {
        int n,k,min_,min__;
        cin>>n>>k;
        min_=k;
        for(int i=0;i<n;i++)
        {
            cin>>maze[i];
            if(maze[i]<min_)
            {
                min_=maze[i];
                min__=i;
            }
        }
        int times=0;
        for(int i=0;i<n;i++)
        {
            if(i==min__)
            {
                continue;
            }
            times+=(k-maze[i])/min_;
        }
        cout<<times<<endl;
    }
    return 0;
}
//cout<<"Case #"<<casenum<<": Yes"<<endl;a(n) = 2*a(n-1) + 3*a(n-2)


#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <stack>
#include <map>
#include <cstring>
#include <queue>
#include <cstring>
#include <vector>
#include <algorithm>
#define LL long long

using namespace std;
/*
已知直线上的两点P1(X1,Y1) P2(X2,Y2)， P1 P2两点不重合。则直线的一般式方程AX+BY+C=0中，A B C分别等于：
A = Y2 - Y1
B = X1 - X2
C = X2*Y1 - X1*Y2
*/
int maze[1005];
int main()
{
    cin.tie(0);
    cout.tie(0);
    ios::sync_with_stdio(false);

    int T;
    scanf("%d",&T);
    int casenum=0;
    while(T--)
    {
        int n,k,min_,min__;
        cin>>n>>k;
        min_=k;
        for(int i=0;i<n;i++)
        {
            cin>>maze[i];
            if(maze[i]<min_)
            {
                min_=maze[i];
                min__=i;
            }
        }
        int times=0;
        for(int i=0;i<n;i++)
        {
            if(i==min__)
            {
                continue;
            }
            times+=(k-maze[i])/min_;
        }
        cout<<times<<endl;
    }
    return 0;
}
//cout<<"Case #"<<casenum<<": Yes"<<endl;a(n) = 2*a(n-1) + 3*a(n-2)


#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <stack>
#include <map>
#include <cstring>
#include <queue>
#include <cstring>
#include <vector>
#include <algorithm>
#define LL long long

using namespace std;
/*
已知直线上的两点P1(X1,Y1) P2(X2,Y2)， P1 P2两点不重合。则直线的一般式方程AX+BY+C=0中，A B C分别等于：
A = Y2 - Y1
B = X1 - X2
C = X2*Y1 - X1*Y2
*/
int maze[1005];
int main()
{
    cin.tie(0);
    cout.tie(0);
    ios::sync_with_stdio(false);

    int T;
    scanf("%d",&T);
    int casenum=0;
    while(T--)
    {
        int n,k,min_,min__=0;
        cin>>n>>k;
        min_=k;
        for(int i=0;i<n;i++)
        {
            cin>>maze[i];
            if(maze[i]<min_)
            {
                min_=maze[i];
                min__=i;
            }
        }
        int times=0;
        for(int i=0;i<n;i++)
        {
            if(i==min__)
            {
                continue;
            }
            times+=(k-maze[i])/min_;
        }
        cout<<times<<endl;
    }
    return 0;
}
//cout<<"Case #"<<casenum<<": Yes"<<endl;a(n) = 2*a(n-1) + 3*a(n-2)


#include<iostream>
#include<bits/stdc++.h>
#include<vector>
#include<cctype>
#include<string>
#include<algorithm>
#include<stdint.h>

using namespace std;

int main() {
    int t;
    cin>>t;
    while(t--) {
       int n, k;
       cin>>n>>k;
       vector <int> arr(n);
       for(int i= 0; i<n; i++) cin>>arr[i];
       int m = *min_element (arr.begin(), arr.end());
       int mi = min_element(arr.begin(),arr.end()) - arr.begin();
       int count = 0;
       for(int i = 0; i<n; i++) {
           if(i!=mi) {
           if(arr[i] < k ) {
               count+= (k - arr[i]) / m ;
           }
           }
       }
       cout<<count<endl;
    }
}


#include<iostream>
#include<bits/stdc++.h>
#include<vector>
#include<cctype>
#include<string>
#include<algorithm>
#include<stdint.h>

using namespace std;

int main() {
    int t;
    cin>>t;
    while(t--) {
       int n, k;
       cin>>n>>k;
       vector <int> arr(n);
       for(int i= 0; i<n; i++) cin>>arr[i];
       int m = *min_element (arr.begin(), arr.end());
       int mi = min_element(arr.begin(),arr.end()) - arr.begin();
       int count = 0;
       for(int i = 0; i<n; i++) {
           if(i!=mi) {
           if(arr[i] < k ) {
               count+= (k - arr[i]) / m ;
           }
           }
       }
       cout<<count;
    }
}


#include <iostream>
#include<bits/stdc++.h>
using namespace std;
//#define ll long long int;
#define fio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
int main() {

	fio;
	int t;cin>>t;
	while(t--)
	{
	     int n, k, sum=0;
      cin>>n>>k;
	     int arr[n];

	    for(int i=0;i<n;i++)
	    {
	        cin>>arr[i];
}

      for( int i=0;i<n;i++)
	    {
             sum=sum+arr[i+1];
       }
     cout<<sum<<endl;
}
	   return 0;
}


#include <iostream>
#include<bits/stdc++.h>
using namespace std;
//#define ll long long int;
#define fio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
int main() {

	fio;
	int t;cin>>t;
	while(t--)
	{
	    long long  int n, k;
      cin>>n>>k;
	    long long int arr[n];

	    for(int i=0;i<n;i++)
	    {
	        cin>>arr[i];
}
      long long  sum=0;
      for(long long  int i=0;i<n;i++)
	    {
             sum=sum+arr[i+1];
       }
     cout<<sum<<endl;
}
	   return 0;
}


#include<iostream>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<algorithm>
#define INF 1125899906842624
using namespace std;
inline int read()
{
	int neg=1,num=0;char c=getchar();
	for(;!isdigit(c);c=getchar())if(c=='-')neg=-1;
	for(;isdigit(c);c=getchar())num=(num<<1)+(num<<3)+c-'0';
	return neg*num;
}
struct node
{
	int u,v;
	long long val;
}Edge[500010];
int n,m,s,cnt,f[500010],t;
long long dis[401][401],path[500010],vis[500010];
bool cmp(node x,node y)
{
	return x.val<y.val;
}
long long Min(long long x,long long y)
{
	return x<y?x:y;
}
int main()
{
	n=read();m=read();s=read();
	for(int i=1;i<=m;i++)
	{
		Edge[i].u=read();
		Edge[i].v=read();
		Edge[i].val=read();
	}
	sort(Edge+1,Edge+m+1,cmp);
	for(int i=1;i<=2*s+1;i++)
		for(int j=1;j<=2*s+1;j++)
			dis[i][j]=INF;
	for(int i=1;i<=3*s;i++)dis[i][i]=0;
	for(int i=1;i<=s;i++)vis[Edge[i].u]=vis[Edge[i].v]=1;
	for(int i=1;i<=n;i++)f[i]=f[i-1]+vis[i];
	for(int i=1;i<=s;i++)dis[f[Edge[i].u]][f[Edge[i].v]]=dis[f[Edge[i].v]][f[Edge[i].u]]=Edge[i].val;
	cnt=f[n];
	for(int k=1;k<=cnt;k++)
		for(int i=1;i<=cnt;i++)
			for(int j=1;j<=cnt;j++)
				dis[i][j]=Min(dis[i][j],dis[i][k]+dis[k][j]);
	for(int i=1;i<=cnt;i++)
		for(int j=i+1;j<=cnt;j++)
			path[++t]=dis[i][j];
	sort(path+1,path+t+1);
	printf("%lld",path[s]);
	return 0;
}


#include<iostream>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<algorithm>
#define INF 1125899906842624
using namespace std;
inline int read()
{
	int neg=1,num=0;char c=getchar();
	for(;!isdigit(c);c=getchar())if(c=='-')neg=-1;
	for(;isdigit(c);c=getchar())num=(num<<1)+(num<<3)+c-'0';
	return neg*num;
}
struct node
{
	int u,v;
	long long val;
}Edge[500010];
int n,m,s,cnt,f[500010],t;
long long dis[401][401],path[500010];
bool vis[500010];
bool cmp(node x,node y)
{
	return x.val<y.val;
}
long long Min(long long x,long long y)
{
	return x<y?x:y;
}
int main()
{
	n=read();m=read();s=read();
	for(int i=1;i<=m;i++)
	{
		Edge[i].u=read();
		Edge[i].v=read();
		Edge[i].val=read();
	}
	sort(Edge+1,Edge+m+1,cmp);
	for(int i=1;i<=2*s+1;i++)
		for(int j=1;j<=2*s+1;j++)
			dis[i][j]=INF;
	for(int i=1;i<=2*s+1;i++)dis[i][i]=0;
	for(int i=1;i<=s;i++)
	{
		if(!vis[Edge[i].u])
		{
			f[Edge[i].u]=++cnt;
			vis[Edge[i].u]=1;
		}
		if(!vis[Edge[i].v])
		{
			f[Edge[i].v]=++cnt;
			vis[Edge[i].v]=1;
		}
		dis[f[Edge[i].u]][f[Edge[i].v]]=Edge[i].val;
		dis[f[Edge[i].v]][f[Edge[i].u]]=Edge[i].val;
	}
	for(int k=1;k<=cnt;k++)
		for(int i=1;i<=cnt;i++)
			for(int j=1;j<=cnt;j++)
				dis[i][j]=Min(dis[i][j],dis[i][k]+dis[k][j]);
	for(int i=1;i<=cnt;i++)
		for(int j=i+1;j<=cnt;j++)
			path[++t]=dis[i][j];
	sort(path+1,path+t+1);
	printf("%lld",path[s]);
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define get(x,y) (x-1)*n+y
#define For(i,j,k) for(int i=(int)(j);i<=(int)(k);i++)
#define Rep(i,j,k) for(int i=(int)(j);i>=(int)(k);i--)
inline ll read(){
	ll x=0;char ch=getchar();bool f=0;
	for(;!isdigit(ch);ch=getchar()) if(ch=='-') f=1;
	for(;isdigit(ch);ch=getchar()) x=x*10+ch-'0';
	return f?-x:x;
}
void write(ll x){
	if(x<0) putchar('-'),x=-x;
	if(x>=10) write(x/10);putchar(x%10+'0');
}
void writeln(ll x){write(x);puts("");}
void writep(ll x){write(x);putchar(' ');}

int const N=2e5+3;
int const M=2e5+3;
int const K=400+3;
ll const inf=1e18;
int n,m,k,cnt,tot,h[N],vis[N],b[N],vis_[N];
ll dis[N];
struct edge{
	int nt,to,w;
}e[M<<1];
struct node{
	int x,y,d;
}a[M];
priority_queue<int,vector<int>,greater<int> > Q;

bool cmp(node A,node B){
	return A.d<B.d;
}
void add(int x,int y,int z){
	e[++cnt]={h[x],y,z};
	h[x]=cnt;
}
void Dijkstra(int s){
	priority_queue<pair<int,int>,vector<pair<int,int> >,greater<pair<int,int> > > q;
	memset(vis,0,sizeof(vis));
	for (int i=1;i<=n;i++) dis[i]=inf;
	dis[s]=0;q.push(make_pair(0,s));
	while (!q.empty()){
		int x=q.top().second;q.pop();
		if (!vis[x]){
			vis[x]=1;
			for (int i=h[x];i;i=e[i].nt){
				int v=e[i].to;
				if (dis[v]>dis[x]+e[i].w){
					dis[v]=dis[x]+e[i].w;
					q.push(make_pair(dis[v],v));
				}
			}
		}
	}
}
void spfa(int s){
	queue<int> q;
	for (int i=1;i<=n;i++) dis[i]=inf;
	dis[s]=0;vis[s]=1;q.push(s);
	while (!q.empty()){
		int x=q.front();
		q.pop();vis[x]=0;
		for (int i=h[x];i;i=e[i].nt){
			int v=e[i].to;
			if (dis[v]<dis[x]+e[i].w){
				dis[v]=dis[x]+e[i].w;
				if (!vis[v]) q.push(v),vis[v]=1;
			}
		}
	}
}
int main(){
    n=read();m=read();k=read();
    for (int i=1;i<=m;i++)
      a[i].x=read(),a[i].y=read(),a[i].d=read();
    sort(a+1,a+m+1,cmp);
    m=min(m,k);
    for (int i=1;i<=m;i++){
    	add(a[i].x,a[i].y,a[i].d);add(a[i].y,a[i].x,a[i].d);
    	if (!vis_[a[i].x]) vis_[a[i].x]=1,b[++tot]=a[i].x;
    	if (!vis_[a[i].y]) vis_[a[i].y]=1,b[++tot]=a[i].y;
    }
    for (int i=1;i<=tot;i++){
    	Dijkstra(b[i]);
    	for (int j=i+1;j<=tot;j++)
    	  Q.push(dis[b[j]]);
    }
    for (int i=1;i<k;i++) Q.pop();
    writeln(Q.top());
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define get(x,y) (x-1)*n+y
#define For(i,j,k) for(int i=(int)(j);i<=(int)(k);i++)
#define Rep(i,j,k) for(int i=(int)(j);i>=(int)(k);i--)
inline ll read(){
	ll x=0;char ch=getchar();bool f=0;
	for(;!isdigit(ch);ch=getchar()) if(ch=='-') f=1;
	for(;isdigit(ch);ch=getchar()) x=x*10+ch-'0';
	return f?-x:x;
}
void write(ll x){
	if(x<0) putchar('-'),x=-x;
	if(x>=10) write(x/10);putchar(x%10+'0');
}
void writeln(ll x){write(x);puts("");}
void writep(ll x){write(x);putchar(' ');}

int const N=2e5+3;
int const M=2e5+3;
int const K=400+3;
int const inf=1e9;
int n,m,k,cnt,tot,h[N],vis[N],dis[N],b[N],vis_[N];
struct edge{
	int nt,to,w;
}e[M<<1];
struct node{
	int x,y,d;
}a[M];
priority_queue<int,vector<int>,greater<int> > Q;

bool cmp(node A,node B){
	return A.d<B.d;
}
void add(int x,int y,int z){
	e[++cnt]={h[x],y,z};
	h[x]=cnt;
}
void Dijkstra(int s){
	priority_queue<pair<int,int>,vector<pair<int,int> >,greater<pair<int,int> > > q;
	memset(vis,0,sizeof(vis));
	for (int i=1;i<=n;i++) dis[i]=inf;
	dis[s]=0;q.push(make_pair(0,s));
	while (!q.empty()){
		int x=q.top().second;q.pop();
		if (!vis[x]){
			vis[x]=1;
			for (int i=h[x];i;i=e[i].nt){
				int v=e[i].to;
				if (dis[v]>dis[x]+e[i].w){
					dis[v]=dis[x]+e[i].w;
					q.push(make_pair(dis[v],v));
				}
			}
		}
	}
}
void spfa(int s){
	queue<int> q;
	for (int i=1;i<=n;i++) dis[i]=inf;
	dis[s]=0;vis[s]=1;q.push(s);
	while (!q.empty()){
		int x=q.front();
		q.pop();vis[x]=0;
		for (int i=h[x];i;i=e[i].nt){
			int v=e[i].to;
			if (dis[v]<dis[x]+e[i].w){
				dis[v]=dis[x]+e[i].w;
				if (!vis[v]) q.push(v),vis[v]=1;
			}
		}
	}
}
int main(){
    n=read();m=read();k=read();
    for (int i=1;i<=m;i++)
      a[i].x=read(),a[i].y=read(),a[i].d=read();
    sort(a+1,a+m+1,cmp);
    m=min(m,k);
    for (int i=1;i<=m;i++){
    	add(a[i].x,a[i].y,a[i].d);add(a[i].y,a[i].x,a[i].d);
    	if (!vis_[a[i].x]) vis_[a[i].x]=1,b[++tot]=a[i].x;
    	if (!vis_[a[i].y]) vis_[a[i].y]=1,b[++tot]=a[i].y;
    }
    for (int i=1;i<=tot;i++){
    	Dijkstra(b[i]);
    	for (int j=i+1;j<=tot;j++)
    	  Q.push(dis[b[j]]);
    }
    for (int i=1;i<k;i++) Q.pop();
    writeln(Q.top());
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define get(x,y) (x-1)*n+y
#define For(i,j,k) for(int i=(int)(j);i<=(int)(k);i++)
#define Rep(i,j,k) for(int i=(int)(j);i>=(int)(k);i--)
inline ll read(){
	ll x=0;char ch=getchar();bool f=0;
	for(;!isdigit(ch);ch=getchar()) if(ch=='-') f=1;
	for(;isdigit(ch);ch=getchar()) x=x*10+ch-'0';
	return f?-x:x;
}
void write(ll x){
	if(x<0) putchar('-'),x=-x;
	if(x>=10) write(x/10);putchar(x%10+'0');
}
void writeln(ll x){write(x);puts("");}
void writep(ll x){write(x);putchar(' ');}

int const N=2e5+3;
int const M=2e5+3;
int const K=400+3;
int const inf=INT_MAX;
int n,m,k,cnt,tot,h[N],vis[N],dis[N],b[N],vis_[N];
struct edge{
	int nt,to,w;
}e[M<<1];
struct node{
	int x,y,d;
}a[M];
priority_queue<int,vector<int>,greater<int> > Q;

bool cmp(node A,node B){
	return A.d<B.d;
}
void add(int x,int y,int z){
	e[++cnt]={h[x],y,z};
	h[x]=cnt;
}
void Dijkstra(int s){
	priority_queue<pair<int,int>,vector<pair<int,int> >,greater<pair<int,int> > > q;
	memset(vis,0,sizeof(vis));
	for (int i=1;i<=n;i++) dis[i]=inf;
	dis[s]=0;q.push(make_pair(0,s));
	while (!q.empty()){
		int x=q.top().second;q.pop();
		if (!vis[x]){
			vis[x]=1;
			for (int i=h[x];i;i=e[i].nt){
				int v=e[i].to;
				if (dis[v]>dis[x]+e[i].w){
					dis[v]=dis[x]+e[i].w;
					q.push(make_pair(dis[v],v));
				}
			}
		}
	}
}
void spfa(int s){
	queue<int> q;
	for (int i=1;i<=n;i++) dis[i]=inf;
	dis[s]=0;vis[s]=1;q.push(s);
	while (!q.empty()){
		int x=q.front();
		q.pop();vis[x]=0;
		for (int i=h[x];i;i=e[i].nt){
			int v=e[i].to;
			if (dis[v]<dis[x]+e[i].w){
				dis[v]=dis[x]+e[i].w;
				if (!vis[v]) q.push(v),vis[v]=1;
			}
		}
	}
}
int main(){
    n=read();m=read();k=read();
    for (int i=1;i<=m;i++)
      a[i].x=read(),a[i].y=read(),a[i].d=read();
    sort(a+1,a+m+1,cmp);
    m=min(m,k);
    for (int i=1;i<=m;i++){
    	add(a[i].x,a[i].y,a[i].d);add(a[i].y,a[i].x,a[i].d);
    	if (!vis_[a[i].x]) vis_[a[i].x]=1,b[++tot]=a[i].x;
    	if (!vis_[a[i].y]) vis_[a[i].y]=1,b[++tot]=a[i].y;
    }
    for (int i=1;i<=tot;i++){
    	Dijkstra(b[i]);
    	for (int j=i+1;j<=tot;j++)
    	  Q.push(dis[b[j]]);
    }
    for (int i=1;i<k;i++) Q.pop();
    writeln(Q.top());
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define int long long
#define get(x,y) (x-1)*n+y
#define For(i,j,k) for(int i=(int)(j);i<=(int)(k);i++)
#define Rep(i,j,k) for(int i=(int)(j);i>=(int)(k);i--)
inline ll read(){
	ll x=0;char ch=getchar();bool f=0;
	for(;!isdigit(ch);ch=getchar()) if(ch=='-') f=1;
	for(;isdigit(ch);ch=getchar()) x=x*10+ch-'0';
	return f?-x:x;
}
void write(ll x){
	if(x<0) putchar('-'),x=-x;
	if(x>=10) write(x/10);putchar(x%10+'0');
}
void writeln(ll x){write(x);puts("");}
void writep(ll x){write(x);putchar(' ');}

int const N=2e5+3;
int const M=2e5+3;
int const K=400+3;
int const inf=1e18;
int n,m,k,cnt,tot,h[N],vis[N],b[N],vis_[N],dis[N];
struct edge{
	int nt,to,w;
}e[M<<1];
struct node{
	int x,y,d;
}a[M];
priority_queue<int,vector<int>,greater<int> > Q;

bool cmp(node A,node B){
	return A.d<B.d;
}
void add(int x,int y,int z){
	e[++cnt]={h[x],y,z};
	h[x]=cnt;
}
void Dijkstra(int s){
	priority_queue<pair<int,int>,vector<pair<int,int> >,greater<pair<int,int> > > q;
	memset(vis,0,sizeof(vis));
	for (int i=1;i<=n;i++) dis[i]=inf;
	dis[s]=0;q.push(make_pair(0,s));
	while (!q.empty()){
		int x=q.top().second;q.pop();
		if (!vis[x]){
			vis[x]=1;
			for (int i=h[x];i;i=e[i].nt){
				int v=e[i].to;
				if (dis[v]>dis[x]+e[i].w){
					dis[v]=dis[x]+e[i].w;
					q.push(make_pair(dis[v],v));
				}
			}
		}
	}
}
void spfa(int s){
	queue<int> q;
	for (int i=1;i<=n;i++) dis[i]=inf;
	dis[s]=0;vis[s]=1;q.push(s);
	while (!q.empty()){
		int x=q.front();
		q.pop();vis[x]=0;
		for (int i=h[x];i;i=e[i].nt){
			int v=e[i].to;
			if (dis[v]<dis[x]+e[i].w){
				dis[v]=dis[x]+e[i].w;
				if (!vis[v]) q.push(v),vis[v]=1;
			}
		}
	}
}
signed main(){
    n=read();m=read();k=read();
    for (int i=1;i<=m;i++)
      a[i].x=read(),a[i].y=read(),a[i].d=read();
    sort(a+1,a+m+1,cmp);
    m=min(m,k);
    for (int i=1;i<=m;i++){
    	add(a[i].x,a[i].y,a[i].d);add(a[i].y,a[i].x,a[i].d);
    	if (!vis_[a[i].x]) vis_[a[i].x]=1,b[++tot]=a[i].x;
    	if (!vis_[a[i].y]) vis_[a[i].y]=1,b[++tot]=a[i].y;
    }
    for (int i=1;i<=tot;i++){
    	Dijkstra(b[i]);
    	for (int j=i+1;j<=tot;j++)
    	  Q.push(dis[b[j]]);
    }
    for (int i=1;i<k;i++) Q.pop();
    writeln(Q.top());
	return 0;
}


#include <cstdio>
#include <cmath>
#include <algorithm>
#include <iostream>
#include <vector>
#include <queue>
#include <string>
#include <cstring>
#include <queue>
#include <map>
#include <set>
#include <stack>
using namespace std;
#define ll long long
#define ull unsigned long long
#define up(i, a, b) for (int i = (a); i <= (b); i++)
#define down(i, a, b) for (int i = (a); i >= (b); i--)
#define mem(x, y) memset(x, (y), sizeof x)
#define ff first
#define ss second
#define mp(x, y) make_pair(x, y)
#define pb(x) push_back(x)
#define sc(a) scanf("%d", &a)
#define scl(a) scanf("%lld", &a)
#define scs(a) scanf("%s", a)
#define pr(a, b) printf("%d%c", a, b)
#define prl(a, b) printf("%lld%c", a, b)
#define PQ priority_queue
#define ld long double
#define all(v) v.begin(), v.end()
#define IOS ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)

typedef pair<ll, int> pii;
typedef map<int, int> mii;
typedef vector<int> V;

const int N=3e5+10;
pair<pii,int> a[N];
vector<pair<pii,int>>v[810];
set<int>s[810];
mii mp;
int mapp[N],f[N],vis[N];
ll w[810][810];
ll ans[330010];
void floyd(int n) {
	up(i,1,n)up(o,1,n)up(p,1,n)if(w[i][o]>w[i][p]+w[p][o])w[i][o]=w[i][p]+w[p][o];
}
int find(int x) {
	return f[x]==x?x:f[x]=find(f[x]);
}
void add(int x,int y) {
	int fx=find(x),fy=find(y);
	if(fx!=fy)f[fx]=fy;
}
int main() {
	int n,m,k;
	sc(n),sc(m),sc(k);
	up(i,1,m)sc(a[i].ff.ff),sc(a[i].ff.ss),sc(a[i].ss),mp[a[i].ss]++;
	sort(a+1,a+1+m,[](pair<pii,int> a,pair<pii,int> b) {
		return a.ss<b.ss;
	});
	if(m<=400){
		mp.clear();
		up(i,1,m)mp[a[i].ff.ff]++,mp[a[i].ff.ss]++;
		int c=0;
		for(auto i:mp)mp[i.ff]=++c;
		up(i,1,c)up(o,1,c)w[i][o]=1e17;
		up(i,1,m)w[mp[a[i].ff.ss]][mp[a[i].ff.ff]]=w[mp[a[i].ff.ff]][mp[a[i].ff.ss]]=a[i].ss;
		floyd(c);
		up(i,1,c)up(o,i+1,c)if(w[i][o]<1e17)ans[++ans[0]]=w[i][o];
		sort(ans+1,ans+1+ans[0]);
		pr(ans[k],'\n');
		return 0;
	}
	int end;
	up(i,1,k)
	if(a[i].ss==a[k].ss) {
		end=i-1;
		break;
	}

	up(i,1,n)f[i]=i;
	up(i,1,end)add(a[i].ff.ff,a[i].ff.ss),vis[a[i].ff.ff]++,vis[a[i].ff.ss]++;
	up(i,1,end)add(a[i].ff.ff,a[i].ff.ss);
	int c=0;
	up(i,1,n)if(f[i]==i&&vis[i])mapp[i]=++c;
//	up(i,1,n)pr(f[i],' ');printf("\n");
	up(i,1,end) {
		int ind=mapp[f[a[i].ff.ff]];
		s[ind].insert(a[i].ff.ff),s[ind].insert(a[i].ff.ss);
		v[ind].pb(mp(mp(a[i].ff.ff,a[i].ff.ss),a[i].ss));
	}
	up(p,1,c) {
		int si=s[p].size();
		up(i,1,si)up(o,1,si)w[i][o]=1e17;
		int j=0;
		for(auto i:s[p])mapp[i]=++j;
		for(auto i:v[p])w[mapp[i.ff.ff]][mapp[i.ff.ss]]=w[mapp[i.ff.ss]][mapp[i.ff.ss]]=i.ss;
		floyd(si);
		up(i,1,si)up(o,i+1,si)if(w[i][o]<1e17)ans[++ans[0]]=w[i][o];
	}
	sort(ans+1,ans+1+ans[0]);
	int index=upper_bound(ans+1,ans+1+ans[0],a[k].ss)-ans-2;
	if(index>=k)prl(ans[k],'\n');
	else pr(a[k].ss,'\n');
}


#include <cstdio>
#include <cmath>
#include <algorithm>
#include <iostream>
#include <vector>
#include <queue>
#include <string>
#include <cstring>
#include <queue>
#include <map>
#include <set>
#include <stack>
using namespace std;
#define ll long long
#define ull unsigned long long
#define up(i, a, b) for (int i = (a); i <= (b); i++)
#define down(i, a, b) for (int i = (a); i >= (b); i--)
#define mem(x, y) memset(x, (y), sizeof x)
#define ff first
#define ss second
#define mp(x, y) make_pair(x, y)
#define pb(x) push_back(x)
#define sc(a) scanf("%d", &a)
#define scl(a) scanf("%lld", &a)
#define scs(a) scanf("%s", a)
#define pr(a, b) printf("%d%c", a, b)
#define prl(a, b) printf("%lld%c", a, b)
#define PQ priority_queue
#define ld long double
#define all(v) v.begin(), v.end()
#define IOS ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)

typedef pair<ll, int> pii;
typedef map<int, int> mii;
typedef vector<int> V;

const int N=3e5+10;
pair<pii,int> a[N];
vector<pair<pii,int>>v[810];
set<int>s[810];
mii mp;
int mapp[N],f[N],vis[N];
ll w[810][810];
ll ans[330010];
void floyd(int n) {
	up(i,1,n)up(o,1,n)up(p,1,n)if(w[i][o]>w[i][p]+w[p][o])w[i][o]=w[i][p]+w[p][o];
}
int find(int x) {
	return f[x]==x?x:f[x]=find(f[x]);
}
void add(int x,int y) {
	int fx=find(x),fy=find(y);
	if(fx!=fy)f[fx]=fy;
}
int main() {
	int n,m,k;
	sc(n),sc(m),sc(k);
	up(i,1,m)sc(a[i].ff.ff),sc(a[i].ff.ss),sc(a[i].ss),mp[a[i].ss]++;
	sort(a+1,a+1+m,[](pair<pii,int> a,pair<pii,int> b) {
		return a.ss<b.ss;
	});
	if(m<k) {
		up(i,1,n)up(o,1,n)w[i][o]=1e17;
		up(i,1,m)w[a[i].ff.ss][a[i].ff.ff]=w[a[i].ff.ff][a[i].ff.ss]=a[i].ss;
		floyd(n);
		up(i,1,n)up(o,i+1,n)if(w[i][o]<1e17)ans[++ans[0]]=w[i][o];
		sort(ans+1,ans+1+ans[0]);
		prl(ans[k],'\n');
		return 0;
	}
	int end;
	up(i,1,k)
	if(a[i].ss==a[k].ss) {
		end=i-1;
		break;
	}

	up(i,1,n)f[i]=i;
	up(i,1,end)add(a[i].ff.ff,a[i].ff.ss),vis[a[i].ff.ff]++,vis[a[i].ff.ss]++;
	int c=0;
	up(i,1,n)if(find(i)==i&&vis[i])mapp[i]=++c;
//	up(i,1,n)pr(f[i],' ');printf("\n");
	up(i,1,end) {
		int ind=mapp[find(a[i].ff.ff)];
		s[ind].insert(a[i].ff.ff),s[ind].insert(a[i].ff.ss);
		v[ind].pb(mp(mp(a[i].ff.ff,a[i].ff.ss),a[i].ss));
	}
	up(p,1,c) {
		int si=s[p].size();
		up(i,1,si)up(o,1,si)w[i][o]=1e17;
		int j=0;
		for(auto i:s[p])mapp[i]=++j;
		for(auto i:v[p])w[mapp[i.ff.ff]][mapp[i.ff.ss]]=w[mapp[i.ff.ss]][mapp[i.ff.ff]]=i.ss;
		floyd(si);
		up(i,1,si)up(o,i+1,si)if(w[i][o]<1e17)ans[++ans[0]]=w[i][o];
	}
	sort(ans+1,ans+1+ans[0]);
	int index=upper_bound(ans+1,ans+1+ans[0],a[k].ss)-ans-2;
	if(index>=k)prl(ans[k],'\n');
	else pr(a[k].ss,'\n');
}


#include <cstdio>
#include <cmath>
#include <algorithm>
#include <iostream>
#include <vector>
#include <queue>
#include <string>
#include <cstring>
#include <queue>
#include <map>
#include <set>
#include <stack>
using namespace std;
#define ll long long
#define ull unsigned long long
#define up(i, a, b) for (int i = (a); i <= (b); i++)
#define down(i, a, b) for (int i = (a); i >= (b); i--)
#define mem(x, y) memset(x, (y), sizeof x)
#define ff first
#define ss second
#define mp(x, y) make_pair(x, y)
#define pb(x) push_back(x)
#define sc(a) scanf("%d", &a)
#define scl(a) scanf("%lld", &a)
#define scs(a) scanf("%s", a)
#define pr(a, b) printf("%d%c", a, b)
#define prl(a, b) printf("%lld%c", a, b)
#define PQ priority_queue
#define ld long double
#define all(v) v.begin(), v.end()
#define IOS ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)

typedef pair<ll, int> pii;
typedef map<int, int> mii;
typedef vector<int> V;

const int N=3e5+10;
pair<pii,int> a[N];
vector<pair<pii,int>>v[810];
set<int>s[810];
mii mp;
int mapp[N],f[N],vis[N];
ll w[810][810];
ll ans[330010];
void floyd(int n) {
	up(i,1,n)up(o,1,n)up(p,1,n)if(w[i][o]>w[i][p]+w[p][o])w[i][o]=w[i][p]+w[p][o];
}
int find(int x) {
	return f[x]==x?x:f[x]=find(f[x]);
}
void add(int x,int y) {
	int fx=find(x),fy=find(y);
	if(fx!=fy)f[fx]=fy;
}
int main() {
	int n,m,k;
	sc(n),sc(m),sc(k);
	up(i,1,m)sc(a[i].ff.ff),sc(a[i].ff.ss),sc(a[i].ss),mp[a[i].ss]++;
	sort(a+1,a+1+m,[](pair<pii,int> a,pair<pii,int> b) {
		return a.ss<b.ss;
	});
	if(m<=400){
		mp.clear();
		up(i,1,m)mp[a[i].ff.ff]++,mp[a[i].ff.ss]++;
		int c=0;
		for(auto i:mp)mp[i.ff]=++c;
		up(i,1,c)up(o,1,c)w[i][o]=1e17;
		up(i,1,m)w[mp[a[i].ff.ss]][mp[a[i].ff.ff]]=w[mp[a[i].ff.ff]][mp[a[i].ff.ss]]=a[i].ss;
		floyd(c);
		up(i,1,c)up(o,i+1,c)if(w[i][o]<1e17)ans[++ans[0]]=w[i][o];
		sort(ans+1,ans+1+ans[0]);
		prl(ans[k],'\n');
		return 0;
	}
	int end;
	up(i,1,k)
	if(a[i].ss==a[k].ss) {
		end=i-1;
		break;
	}

	up(i,1,n)f[i]=i;
	up(i,1,end)add(a[i].ff.ff,a[i].ff.ss),vis[a[i].ff.ff]++,vis[a[i].ff.ss]++;
	up(i,1,end)add(a[i].ff.ff,a[i].ff.ss);
	int c=0;
	up(i,1,n)if(f[i]==i&&vis[i])mapp[i]=++c;
//	up(i,1,n)pr(f[i],' ');printf("\n");
	up(i,1,end) {
		int ind=mapp[f[a[i].ff.ff]];
		s[ind].insert(a[i].ff.ff),s[ind].insert(a[i].ff.ss);
		v[ind].pb(mp(mp(a[i].ff.ff,a[i].ff.ss),a[i].ss));
	}
	up(p,1,c) {
		int si=s[p].size();
		up(i,1,si)up(o,1,si)w[i][o]=1e17;
		int j=0;
		for(auto i:s[p])mapp[i]=++j;
		for(auto i:v[p])w[mapp[i.ff.ff]][mapp[i.ff.ss]]=w[mapp[i.ff.ss]][mapp[i.ff.ss]]=i.ss;
		floyd(si);
		up(i,1,si)up(o,i+1,si)if(w[i][o]<1e17)ans[++ans[0]]=w[i][o];
	}
	sort(ans+1,ans+1+ans[0]);
	int index=upper_bound(ans+1,ans+1+ans[0],a[k].ss)-ans-2;
	if(index>=k)prl(ans[k],'\n');
	else pr(a[k].ss,'\n');
}


#include <cstdio>
#include <cmath>
#include <algorithm>
#include <iostream>
#include <vector>
#include <queue>
#include <string>
#include <cstring>
#include <queue>
#include <map>
#include <set>
#include <stack>
using namespace std;
#define ll long long
#define ull unsigned long long
#define up(i, a, b) for (int i = (a); i <= (b); i++)
#define down(i, a, b) for (int i = (a); i >= (b); i--)
#define mem(x, y) memset(x, (y), sizeof x)
#define ff first
#define ss second
#define mp(x, y) make_pair(x, y)
#define pb(x) push_back(x)
#define sc(a) scanf("%d", &a)
#define scl(a) scanf("%lld", &a)
#define scs(a) scanf("%s", a)
#define pr(a, b) printf("%d%c", a, b)
#define prl(a, b) printf("%lld%c", a, b)
#define PQ priority_queue
#define ld long double
#define all(v) v.begin(), v.end()
#define IOS ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)

typedef pair<int, int> pii;
typedef map<int, int> mii;
typedef vector<int> V;

const int N=3e5+10;
pair<pii,int> a[N];
vector<pair<pii,int>>v[810];
set<int>s[810];
mii mp;
int mapp[N],f[N],vis[N];
ll w[810][810];
ll ans[330010];
void floyd(int n) {
	up(p,1,n)up(i,1,n)up(o,1,n)if(w[i][o]>w[i][p]+w[p][o])w[i][o]=w[i][p]+w[p][o];
}
int find(int x) {
	return f[x]==x?x:f[x]=find(f[x]);
}
void add(int x,int y) {
	int fx=find(x),fy=find(y);
	if(fx!=fy)f[fx]=fy;
}
int main() {
	int n,m,k;
	sc(n),sc(m),sc(k);
	up(i,1,m)sc(a[i].ff.ff),sc(a[i].ff.ss),sc(a[i].ss),mp[a[i].ss]++;
	sort(a+1,a+1+m,[](pair<pii,int> a,pair<pii,int> b) {
		return a.ss<b.ss;
	});
	if(m<k) {
		up(i,1,n)up(o,1,n)w[i][o]=1e17;
		up(i,1,m)w[a[i].ff.ss][a[i].ff.ff]=w[a[i].ff.ff][a[i].ff.ss]=a[i].ss;
		floyd(n);
		up(i,1,n)up(o,i+1,n)if(w[i][o]<1e17)ans[++ans[0]]=w[i][o];
		sort(ans+1,ans+1+ans[0]);
		prl(ans[k],'\n');
		return 0;
	}
	int end;
	up(i,1,k)
	if(a[i].ss==a[k].ss) {
		end=i-1;
		break;
	}

	up(i,1,n)f[i]=i;
	up(i,1,end)add(a[i].ff.ff,a[i].ff.ss),vis[a[i].ff.ff]++,vis[a[i].ff.ss]++;
	int c=0;
	up(i,1,n)if(find(i)==i&&vis[i])mapp[i]=++c;
//	up(i,1,n)pr(f[i],' ');printf("\n");
	up(i,1,end) {
		int ind=mapp[find(a[i].ff.ff)];
		s[ind].insert(a[i].ff.ff),s[ind].insert(a[i].ff.ss);
		v[ind].pb(mp(mp(a[i].ff.ff,a[i].ff.ss),a[i].ss));
	}
	up(p,1,c) {
		int si=s[p].size();
		up(i,1,si)up(o,1,si)w[i][o]=1e17;
		int j=0;
		for(auto i:s[p])mapp[i]=++j;
		for(auto i:v[p])w[mapp[i.ff.ff]][mapp[i.ff.ss]]=w[mapp[i.ff.ss]][mapp[i.ff.ff]]=i.ss;
		floyd(si);
		up(i,1,si)up(o,i+1,si)if(w[i][o]<1e17)ans[++ans[0]]=w[i][o];
	}
	sort(ans+1,ans+1+ans[0]);
	int index=upper_bound(ans+1,ans+1+ans[0],a[k].ss)-ans-2;
	if(index>=k)prl(ans[k],'\n');
	else pr(a[k].ss,'\n');
}