#include<stdio.h>
#include<string.h>
#define Min(a,b) (a < b ? a : b)
int main()
{
int n, t;
while (~scanf("%d%d",&n,&t) && n + t != 0)
{
int i, j, a[100] = {0};
for (i = 1; i <= n; i++)
scanf("%d",&a[i]);
int dp[t+1]; // t+1表示钱,dp表示最少硬币数
memset(dp, 'a', sizeof(dp));
dp[0] = 0;
for (i = 1; i <= n; i++)
for (j = a[i]; j <= t; j++)
dp[j] = Min(dp[j], dp[j-a[i]]+1);
printf("%d\n",dp[t]);
}
return 0;
}