#include <bits/stdc++.h>
using namespace std;
int arr[105];
int main() {
  int n, s = 0, r = 0, i;
  cin >> n;
  for (i = 0; i < n; ++i) {
    cin >> arr[i];
    s += arr[i];
  }
  sort(arr, arr + n);
  while (r < s / 2 + 1) r += arr[--i];
  cout << n - i;
}
