#include <bits/stdc++.h>
using namespace std;
int a[100], b, n, m, i, j, x9, x0, ans, sum;
string s, k = "hello";
int countDivisors(int n) {
  int cnt = 0;
  for (int i = 1; i <= sqrt(n); i++) {
    if (n % i == 0) {
      if (n / i == i)
        cnt++;
      else
        cnt = cnt + 2;
    }
  }
  return cnt;
}
int main() {
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    b += a[i];
  }
  sort(a, a + n);
  for (i = n - 1; i >= 0; i--) {
    if (b >= sum) {
      ans++;
      b -= a[i];
      sum += a[i];
    } else
      break;
  }
  cout << ans;
  return 0;
}
