#include <iostream>
#include <algorithm>
using namespace std;

int main(){
  int n,x;
  int a[n];
  int count=0;
  
  cin>>n>>x;
  for(int i=0;i<n;i++){
    cin>>a[i]
  }
  
  sort(a,a+n);
  
  for(int i=0;i<n;i++){
    while(x-a[i]>=0){
    x-=a[i];
    count++;
    }
  }
  cout<<count<<endl;
}
