#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> coin;
  int n, c, sum1 = 0, sum2 = 0, min;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> c;
    coin.push_back(c);
  }
  sort(coin.begin(), coin.end(), greater<int>());
  vector<int>::iterator it;
  for (int i = 0; i < coin.size(); i++) {
    sum2 = 0;
    sum1 = sum1 + coin[i];
    for (int j = i + 1; j < coin.size(); j++) {
      sum2 = sum2 + coin[j];
    }
    if (sum1 > sum2) {
      min = i + 1;
      break;
    }
  }
  cout << min;
}
