#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, v[101], s = 0, nr = 0, s2 = 0;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> v[i];
    s += v[i];
  }
  sort(v, v + n);
  for (int i = n - 1; i >= 0; --i) {
    s2 += v[i];
    nr++;
    if (s2 > s / 2) {
      break;
    }
  }
  cout << nr;
}
