#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int N, x;
  int ans = 0;
  cin >> N >> x;
  int* a;
  a = new int[N];
  for (int i = 0; i < N; i++) cin >> a[i];
  sort(a, a + N);
  for (int i = N - 1; i >= 0; i--) {
    int j = 0;
    while (x - a[i] >= 0) {
      if (j == 0) {
        ans++;
      }
      x -= a[i];
      j++;
    }
  }
  cout << ans << endl;
  delete[] a;
  return 0;
}
