#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[101];
  int sum = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    sum += a[i];
  }
  sort(a, a + n);
  int j = n - 1;
  int c = 0, k = 0;
  do {
    c++;
    k += a[j];
    j--;
  } while (sum - k >= k && j >= 0);
  cout << c;
  return 0;
}
