#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int a[110];
  float half = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    half = half + a[i];
  }
  half = half / 2;
  for (int i = 0; i < n; i++) {
    for (int j = i; j < n; j++)
      if (a[i] < a[j]) {
        int t = a[i];
        a[i] = a[j];
        a[j] = t;
      }
  }
  float sum = 0;
  int i;
  for (i = 0; i < n; i++) {
    if (sum > half) break;
    sum = sum + a[i];
  }
  cout << i;
  return 0;
}
