There has been marketing warfare among beverage vendors, and they have been working hard for in- crease of their sales. The Kola-Coqua Company is one of the most successful vendors among those: their impressive advertisements toward the world has brought the overwhelming market share of their representative product called Koque.

This time, Kola-Coqua is focusing on vending machines. They think cusomters will be more pleasant as the machines respond more quickly, so they have improved many parts of the machines.

In particular, they have developed a new device of change return. The new device can give one or more kinds of coins at a time (in a single operation), although it can give only one coin for each kind at once. For example, suppose there are 500-yen, 100-yen, 50-yen and 10-yen coins, change of 6540 yen can be made by four operations of giving 500-yen and 10-yen coins and nine operations of giving 500-yen coins. In conclusion, 6540 yen can be returned by thirteen operations. It is supposed that the new device allows customers to make their purchase more quickly and so helps Kola-Coqua’s market share grow up.

However, the project leader says “No, it’s not optimal yet.” His suggesion is as follows: the real opti- mization is to minimize the number of operations. For example, change of 6540 yen should be made with ten of 500-yen coins, ten of 100-yen coins, ten of 50-yen coins, and four of 10-yen coins. This way, 6540 yen can be returned only with ten operations. This allows full speed-up in giving back change, even though it sometimes results in a huge amount of coins.

Given which kinds of coins are available and how much change should be given back, you are to write a program that calculates the minimum number of operations according to the above suggestion. You may assume that there are enough amount of coins inside the vending machines.



Input

The input consists of multiple data sets. Each dataset is described by two lines. The first line contains N (N ≤ 10) and M (M ≤ 100000) indicating the number of kinds of coins and the amount of change to be made, respectively. The second line contains N integers representing the value of each kind of coin.

The input is terminated by a dataset of N = M = 0. This dataset must not be processed.

Output

For each dataset, output in a line the minimum number of operations needed to give back exactly the specified amount of change.

Example

Input

6 330
1 5 10 50 100 500
7 127
1 2 4 8 16 32 64
2 10000
1000 2000
0 0


Output

2
1
4
#include<iostream>
using namespace std;
#define N 100001
#define REP(i,b,n) for(int i=b;i<n;i++)
#define rep(i,n)   REP(i,0,n)

int table[10][N];
int dp(int n,int m,int *coin,int lim){
  rep(i,m+1){
    if ( i%coin[0]==0)table[0][i]=i/coin[0];
    else table[0][i]=lim+1;
  }
  
  REP(i,1,n){
    rep(j,coin[i]){
      if ( table[i-1][j]>lim){
	table[i][j]=lim+1;
      }else table[i][j]=0;
    }
    
    REP(j,coin[i],m+1){
      if ( table[i-1][j]>lim){
	if ( table[i][j-coin[i]]>lim)table[i][j]=lim+1;
	else table[i][j]=table[i][j-coin[i]]+1;
      }
      else table[i][j]=0;
    }    
  }
  
  return table[n-1][m]<=lim?true:false;
}

int solve(int n,int m,int *coin){
  int l=1,r=m,ret=m,mid;
  while(l<=r){
    mid =(l+r)/2;
    if ( dp(n,m,coin,mid)==false)l=mid+1;
    else {
      ret=mid;
      r=mid-1;
    }

  }

  return ret;
}

int main(){
  int n,m;
  while(cin>>n>>m&&n){
    int coin[n];
    rep(i,n)cin>>coin[i];
    cout << solve(n,m,coin) << endl;
  }
}