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