#include <bits/stdc++.h>
using namespace std;
long n, a[100], i, m, sum = 0, t;
int main() {
  cin >> n;
  for (i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  reverse(a, a + n);
  for (i = 0; i < n; i++) sum = sum + a[i];
  m = 0;
  t = 0;
  for (i = 0; i < n; i++)
    if (m <= sum - m) {
      m = m + a[i];
      t++;
    } else
      break;
  cout << t;
  return 0;
}
