#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, n, ar[100], sum = 0, a = 0, b = 0;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> ar[i];
    sum += ar[i];
  }
  for (i = 0; i < n; i++) {
    for (j = i; j < n; j++) {
      if (ar[i] < ar[j]) {
        swap(ar[i], ar[j]);
      }
    }
  }
  for (i = 0; i < n; i++) {
    if (a <= sum / 2) {
      a += ar[i];
      b++;
    }
  }
  cout << endl << b << endl;
}
