#include <bits/stdc++.h>
using namespace std;
int sum(int *arr, int size) {
  int sum = 0;
  for (int i = 0; i < size; i++) {
    sum = sum + arr[i];
  }
  return sum;
}
void print(int *arr, int size) {
  for (int i = 0; i < size; i++) {
    cout << arr[i] << " ";
  }
}
void initialize(int *arr, int size) {
  for (int i = 0; i < size; i++) {
    arr[i] = 0;
  }
}
int main() {
  int n, l = 0, temp, total = 0;
  cin >> n;
  int arr[100];
  initialize(arr, 100);
  while (n--) {
    cin >> temp;
    arr[l] = temp;
    l++;
  }
  total = sum(arr, l);
  total = total >> 1;
  sort(arr, arr + l);
  int ans = 0, count = 0;
  for (int i = l - 1; i >= 0; i--) {
    ans = ans + arr[i];
    count++;
    if (ans > total) break;
  }
  cout << count << endl;
  return 0;
}
