#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, arr[232], sum = 0;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> arr[i], sum += arr[i];
  sort(arr, arr + n);
  reverse(arr, arr + n);
  int ant = 0;
  for (int i = 0; i < n; i++) {
    if (ant > sum) {
      cout << i << endl;
      return 0;
    }
    ant += arr[i];
    sum -= arr[i];
  }
  cout << n << endl;
  return 0;
}
