import java.util.Arrays;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class 실험실 {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer(br.readLine());
int N = Integer.parseInt(st.nextToken());
int K = Integer.parseInt(st.nextToken());
int[] coin = new int[N];
int[] min = new int[K+1];
int tempMin = 100000;
Arrays.sort(coin);
for(int i = 0 ; i < N ; i ++) {
coin[i] = Integer.parseInt(br.readLine());
}
min[0] = 0;
for(int i = 1 ; i<= K ; i ++) {
tempMin = 100000;
for(int j = N-1 ; j >= 0 ; j--) {
if(i - coin[j] >=0 ) {
tempMin = tempMin > min[i-coin[j]]+1 ? min[i-coin[j]]+1 : tempMin ;
}
min[i] = tempMin;
}
}
if(tempMin >= 100000) {
System.out.print(-1);
}else {
System.out.print(min[K]);
}
}
}