#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int N, x;
  cin >> N >> x;
  int c[N];
  int total = 0;
  for (int i = 0; i < N; i++) {
    cin >> c[i];
    total += c[i];
  }
  sort(c, c + N);
  int k = total;
  int l = 0;
  int counter = 0;
  for (int i = 0; i < N; i++) {
    if (total <= x) {
      while (k != x) {
        k = k + c[i];
        counter++;
      }
      cout << N - counter << endl;
      return 0;
    } else if (x < c[0]) {
      cout << 0 << endl;
      return 0;
    } else {
      while (l != x) {
        l = l + c[i];
        counter++;
      }
      cout << counter << endl;
      return 0;
    }
  }
}
