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