#include <stdio.h>
#include <stdio.h>

void SimSelSort(int num[ ], int n,int S);



int main(void){
  int a[100000]={};
  int N;
  int S;
  int b;
  int i=0;

  scanf("%d",&N);

  scanf("%d",&S);

   if(N>100000||S>1000000000){
    printf("Too Large\n");
  }

  for(i;i<N;i++){

   scanf("%d",&a[i]);
   if(a[i]>10000){
    printf("Too Large\n");
    }

  }
  SimSelSort(a,N,S);
}



void SimSelSort(int num[ ], int n,int S)
{
  int i, j, k, min, temp;
  int time=0;
  int sum=0;

    for (i = 0; i < n - 1; i++) {
        min = num[i];                
        k = i;                       
        for (j = i + 1; j < n; j++) {
            if (num[j] < min) {      
                min = num[j];        
                k = j;                
            }
        }                             
        temp = num[i];                
        num[i] = num[k];
        num[k] = temp;
    }
  
    for(n; 0<n; --n){
      
      time++;
      sum += num[n-1];

      if(S<=sum){
	printf("%d\n",time);
	break;
      }else if(n==0){

      printf("0\n");


      }    
       
    }  
       
     if(n==0){

      printf("0\n");


      }   

}