#include <bits/stdc++.h>
using namespace std;
bool cmp(int a, int b) { return a > b; }
int main() {
  int n, arr[111], sum = 0, total = 0, sol = 0;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &arr[i]);
    total += arr[i];
  }
  sort(arr, arr + n, cmp);
  for (int i = 0; i < n; i++) {
    sum += arr[i];
    total -= arr[i];
    sol++;
    if (sum > total) break;
  }
  printf("%d\n", sol);
  return 0;
}
