#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int n, a[105], c = 0, s1 = 0, s2 = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    s1 += a[i];
  }
  sort(a, a + n, greater<int>());
  for (int i = 0; i < n; i++) {
    s2 += a[i];
    c++;
    if (s2 > s1 / 2) break;
  }
  cout << c << endl;
  return 0;
}
