#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
  int N, x; cin >> N >> x;
  int a[N];
  for(int i = 0; i < N; ++i) cin >> a[i];
  sort(a, a + N;
  int peop = 0;

  for(int b = 0; x < a[b]; ++b){
    x -= a[b];
    for(int i = 0; i < N; ++i){
      ++peop;
    }
  }
  cout << peop << endl;
}
