The only difference between easy and hard versions is the constraints.

Polycarp has to write a coursework. The coursework consists of m pages.

Polycarp also has n cups of coffee. The coffee in the i-th cup has a_i caffeine in it. Polycarp can drink some cups of coffee (each one no more than once). He can drink cups in any order. Polycarp drinks each cup instantly and completely (i.e. he cannot split any cup into several days).

Surely, courseworks are not usually being written in a single day (in a perfect world of Berland, at least). Some of them require multiple days of hard work.

Let's consider some day of Polycarp's work. Consider Polycarp drinks k cups of coffee during this day and caffeine dosages of cups Polycarp drink during this day are a_{i_1}, a_{i_2}, ..., a_{i_k}. Then the first cup he drinks gives him energy to write a_{i_1} pages of coursework, the second cup gives him energy to write max(0, a_{i_2} - 1) pages, the third cup gives him energy to write max(0, a_{i_3} - 2) pages, ..., the k-th cup gives him energy to write max(0, a_{i_k} - k + 1) pages.

If Polycarp doesn't drink coffee during some day, he cannot write coursework at all that day.

Polycarp has to finish his coursework as soon as possible (spend the minimum number of days to do it). Your task is to find out this number of days or say that it is impossible.

Input

The first line of the input contains two integers n and m (1 ≤ n ≤ 100, 1 ≤ m ≤ 10^4) — the number of cups of coffee and the number of pages in the coursework.

The second line of the input contains n integers a_1, a_2, ..., a_n (1 ≤ a_i ≤ 100), where a_i is the caffeine dosage of coffee in the i-th cup.

Output

If it is impossible to write the coursework, print -1. Otherwise print the minimum number of days Polycarp needs to do it.

Examples

Input


5 8
2 3 1 1 2


Output


4


Input


7 10
1 3 4 2 1 4 2


Output


2


Input


5 15
5 5 5 5 5


Output


1


Input


5 16
5 5 5 5 5


Output


2


Input


5 26
5 5 5 5 5


Output


-1

Note

In the first example Polycarp can drink fourth cup during first day (and write 1 page), first and second cups during second day (and write 2 + (3 - 1) = 4 pages), fifth cup during the third day (and write 2 pages) and third cup during the fourth day (and write 1 page) so the answer is 4. It is obvious that there is no way to write the coursework in three or less days in this test.

In the second example Polycarp can drink third, fourth and second cups during first day (and write 4 + (2 - 1) + (3 - 2) = 6 pages) and sixth cup during second day (and write 4 pages) so the answer is 2. It is obvious that Polycarp cannot write the whole coursework in one day in this test.

In the third example Polycarp can drink all cups of coffee during first day and write 5 + (5 - 1) + (5 - 2) + (5 - 3) + (5 - 4) = 15 pages of coursework.

In the fourth example Polycarp cannot drink all cups during first day and should drink one of them during the second day. So during first day he will write 5 + (5 - 1) + (5 - 2) + (5 - 3) = 14 pages of coursework and during second day he will write 5 pages of coursework. This is enough to complete it.

In the fifth example Polycarp cannot write the whole coursework at all, even if he will drink one cup of coffee during each day, so the answer is -1.
import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class Main {
	public static void main(String[] args) throws IOException {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		PrintWriter out = new PrintWriter(outputStream);
		InputReader in = new InputReader(inputStream);
		
//		for(int i=4;i<=4;i++) {
//			String f = i+".in";
			//InputStream uinputStream = new FileInputStream("Vacation.in");
//			InputStream uinputStream = new FileInputStream(f);
//			InputReader in = new InputReader(uinputStream);
//			PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("Vacation.out")));
			Task t = new Task();
			t.solve(in, out);
			out.close();			
//		}
	}
	
	static class Task {		
		
		public void solve(InputReader in, PrintWriter out) throws IOException {
			int n = in.nextInt();
			long m = in.nextInt();
			long arr[] = new long[n];
			for(int i=0;i<n;i++) {
				arr[i] = in.nextLong();
			}
			Arrays.sort(arr);
			int l = 1;
			int r = n;
			while(l<r-1) {
				int mid = l+(r-l)/2;
				if(can(arr,m,mid)) {
					r=mid;
				}else {
					l=mid;
				}
			}
			if(can(arr,m,l)) out.println(l);
			else if(can(arr,m,r)) out.println(r);
			else out.println(-1);
		}
		boolean can(long arr[], long work, int day) {
			long v = 0;
			int p=arr.length-1;
			int r=0;
			while(p>=0) {				
				for(int i=0;i<day;i++) {
					if(arr[p]>r) v+=arr[p]-r;
					else {
						p--;
						break;
					}
					p--;
					if(v>=work) return true;
					if(p<0) return false;
				}
				r++;
			}
			return false;
		}

	    public int[] movesToStamp(String stamp, String target) {
	    	int n = stamp.length();
	    	int m = target.length();
	    	char[] s = stamp.toCharArray();
	    	char[] t = target.toCharArray();
	    	ArrayList<Integer> part1 = new ArrayList<Integer>();
	    	ArrayList<Integer> part2 = new ArrayList<Integer>();
	    	ArrayList<Integer> part3 = new ArrayList<Integer>();
	    	int p = target.indexOf(stamp);
            if(p==-1) return new int[] {};
            part1.add(p);
	    	update(t,p,p+stamp.length());
	    	while(true) {
	    		int x = target.indexOf(stamp,p+stamp.length());	    		
	    		if(x==-1) break;
	    		update(t,x,x+stamp.length());
	    		part1.add(0,x);
	    		p=x;
	    	}	    
	    	
	    	TreeSet<Integer> todo = new TreeSet<Integer>(Collections.reverseOrder());
	    	for(int i=0;i<m;i++) if(t[i]!='*') todo.add(i);
	    	
	    	while(true) {
	    		int temp = -1;
	    		for(int i:todo) {
	    			if(i+1<m&&t[i+1]=='*') {
	    				temp = i;
	    				int tmp = stamp.indexOf(t[i]);
	    				if(i-tmp<0) return new int[] {};
	    				part2.add(i-tmp);	    			
	    				t[i]='*';
	    				break;
	    			}
	    		}
	    		if(temp==-1) break;
	    		else todo.remove(temp);
	    	}
	    	
	    	while(!todo.isEmpty()) {
	    		int l = 0; int end = 0;
	    		for(int i:todo) {
	    			end=i;
	    			l = backmatch(s,t,i);
	    			part3.add(i-n+1);	    			
	    			update(t,i-l+1,i);
	    			break;
	    		}
	    		if(l==0) return new int[] {};
	    		else {
	    			for(int j=end-l+1;j<=end;j++)
	    				todo.remove(j);    		
	    		}
	    	}	    	
	    	int[] ret = new int[part1.size()+part2.size()+part3.size()];	
	    	int c=0;
	    	for(int i:part3) {
	    		ret[c++] = i;
	    	}
	    	for(int i:part2) {
	    		ret[c++] = i;
	    	}
	    	for(int i:part1) {
	    		ret[c++] = i;
	    	}	    	
	    	return ret;
	    }
	    public int backmatch(char s[], char t[], int idx) {
	    	int q = s.length-1;
	    	int c = 0;
	    	while(q>0&&idx>0&&s[q]==t[idx]) {
	    		q--;idx--;c++;
	    	}
	    	return c;
	    }
	    public void update(char[] arr, int s, int l) {
	    	for(int i=s;i<l;i++) arr[i] = '*';
	    }
	}
	
	class BIT{
		int arr[];
		int n;
		public BIT(int a) {
			n=a;
			arr = new int[n];
		}
		int sum(int p) {
			int s=0;
			while(p>0) {
				s+=arr[p];
				p-=p&(-p);
			}
			return s;
		}
		void add(int p, int v) {
			while(p<n) {
				arr[p]+=v;
				p+=p&(-p);
			}
		}
	}
//	static class DSU{
//		int[] arr;
//		int[] sz;
//		public DSU(int n) {
//			arr = new int[n];
//			sz = new int[n];
//			for(int i=0;i<n;i++) arr[i] = i;
//			Arrays.fill(sz, 1);
//		}
//		public int find(int a) {
//			if(arr[a]!=a) arr[a] = find(arr[a]);
//			return arr[a];
//		}
//		public void union(int a, int b) {
//			int x = find(a);
//			int y = find(b);
//			if(x==y) return;
//			arr[x] = y;
//			sz[y] += sz[x];
//		}
//		public int size(int x) {
//			return sz[find(x)];
//		}
//	}	
	static class MinHeap<Key> implements Iterable<Key> {
		private int maxN;
		private int n;
		private int[] pq;
		private int[] qp;
		private Key[] keys;
		private Comparator<Key> comparator;
		
		public MinHeap(int capacity){
			if (capacity < 0) throw new IllegalArgumentException();
			this.maxN = capacity;
			n=0;
			pq = new int[maxN+1];
			qp = new int[maxN+1];
			keys = (Key[]) new Object[capacity+1];
			Arrays.fill(qp, -1);
		}
		
		public MinHeap(int capacity, Comparator<Key> c){
			if (capacity < 0) throw new IllegalArgumentException();
			this.maxN = capacity;
			n=0;
			pq = new int[maxN+1];
			qp = new int[maxN+1];
			keys = (Key[]) new Object[capacity+1];
			Arrays.fill(qp, -1);
			comparator = c;
		}			
		public boolean isEmpty()	{ return n==0; 	}
		public int size()			{ return n;		}
		public boolean contains(int i) {
	        if (i < 0 || i >= maxN) throw new IllegalArgumentException();
	        return qp[i] != -1;
		}	
		public int peekIdx() {
	        if (n == 0) throw new NoSuchElementException("Priority queue underflow");
	        return pq[1];		
		}	
		public Key peek(){
			if(isEmpty()) throw new NoSuchElementException("Priority queue underflow");
			return keys[pq[1]];
		}
		public int poll(){
			if(isEmpty()) throw new NoSuchElementException("Priority queue underflow");
			int min = pq[1];
			exch(1,n--);
			down(1);
			assert min==pq[n+1];
			qp[min] = -1;
			keys[min] = null;		
			pq[n+1] = -1;
			return min;
		}
	    public void update(int i, Key key) {
	        if (i < 0 || i >= maxN) throw new IllegalArgumentException();
	        if (!contains(i)) {
	        	this.add(i, key);
	        }else {
	        	keys[i] = key;
	        	up(qp[i]);
	        	down(qp[i]);
	        }
	    }	
		private void add(int i, Key x){
	        if (i < 0 || i >= maxN) throw new IllegalArgumentException();
	        if (contains(i)) throw new IllegalArgumentException("index is already in the priority queue");
	        n++;
	        qp[i] = n;
	        pq[n] = i;
	        keys[i] = x;
	        up(n);
		}
		private void up(int k){
			while(k>1&&less(k,k/2)){
				exch(k,k/2);
				k/=2;
			}
		}
		private void down(int k){
			while(2*k<=n){
				int j=2*k;
				if(j<n&&less(j+1,j)) j++;
				if(less(k,j)) break;
				exch(k,j);
				k=j;
			}
		}
		
		public boolean less(int i, int j){
	        if (comparator == null) {
	            return ((Comparable<Key>) keys[pq[i]]).compareTo(keys[pq[j]]) < 0;
	        }
	        else {
	            return comparator.compare(keys[pq[i]], keys[pq[j]]) < 0;
	        }
		}

		public void exch(int i, int j){
	        int swap = pq[i];
	        pq[i] = pq[j];
	        pq[j] = swap;
	        qp[pq[i]] = i;
	        qp[pq[j]] = j;
		}

		@Override
		public Iterator<Key> iterator() {
			// TODO Auto-generated method stub
			return null;
		}
	}  	

    private static class InputReader
    {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int zcurChar;
        private int znumChars;
        private SpaceCharFilter filter;

        public InputReader(InputStream stream)
        {
            this.stream = stream;
        }

        public int read()
        {
            if (znumChars == -1)
                throw new InputMismatchException();
            if (zcurChar >= znumChars)
            {
            	zcurChar = 0;
                try
                {
                    znumChars = stream.read(buf);
                } catch (IOException e)
                {
                    throw new InputMismatchException();
                }
                if (znumChars <= 0)
                    return -1;
            }
            return buf[zcurChar++];
        }

        public int nextInt()
        {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-')
            {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do
            {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public String nextString()
        {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do
            {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public double nextDouble()
        {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-')
            {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.')
            {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, nextInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.')
            {
                c = read();
                double m = 1;
                while (!isSpaceChar(c))
                {
                    if (c == 'e' || c == 'E')
                        return res * Math.pow(10, nextInt());
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }

        public long nextLong()
        {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-')
            {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do
            {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c)
        {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String next()
        {
            return nextString();
        }

        public interface SpaceCharFilter
        {
            public boolean isSpaceChar(int ch);
        }
    }    

	static class Dumper {
		static void print_int_arr(int[] arr) {
			for (int i = 0; i < arr.length; i++) {
				System.out.print(arr[i] + " ");
			}
			System.out.println();
			System.out.println("---------------------");
		}

		static void print_char_arr(char[] arr) {
			for (int i = 0; i < arr.length; i++) {
				System.out.print(arr[i] + " ");
			}
			System.out.println();
			System.out.println("---------------------");
		}

		static void print_double_arr(double[] arr) {
			for (int i = 0; i < arr.length; i++) {
				System.out.print(arr[i] + " ");
			}
			System.out.println();
			System.out.println("---------------------");
		}

		static void print_2d_arr(int[][] arr, int x, int y) {
			for (int i = 0; i < x; i++) {
				for (int j = 0; j < y; j++) {
					System.out.print(arr[i][j] + " ");
				}
				System.out.println();
			}
			System.out.println();
			System.out.println("---------------------");
		}

		static void print_2d_arr(boolean[][] arr, int x, int y) {
			for (int i = 0; i < x; i++) {
				for (int j = 0; j < y; j++) {
					System.out.print(arr[i][j] + " ");
				}
				System.out.println();
			}
			System.out.println();
			System.out.println("---------------------");
		}

		static void print(Object o) {
			System.out.println(o.toString());
		}

		static void getc() {
			System.out.println("here");
		}
	}
}