#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int arr[100], n, sum = 0;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> arr[i];
    sum = sum + arr[i];
  }
  sort(arr, arr + n, greater<int>());
  int cc = 0, count = 0;
  bool b = true;
  int i = 0;
  while (true) {
    count++;
    cc = cc + arr[i];
    sum = sum - arr[i];
    if (cc > sum) break;
    i++;
  }
  cout << count;
  return 0;
}
