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