#include <bits/stdc++.h>
int cmp(const void* a, const void* b) {
  int* arg1 = (int*)a;
  int* arg2 = (int*)b;
  if (*arg1 > *arg2)
    return -1;
  else if (*arg1 == *arg2)
    return 0;
  else
    return 1;
}
int main() {
  int n, i, sum;
  int a[105];
  scanf("%d", &n);
  sum = 0;
  for (i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    sum += a[i];
  }
  qsort(a, n, sizeof(int), cmp);
  int res = 0, tmp = 0;
  for (i = 0; i < n; i++) {
    res++;
    tmp += a[i];
    if (tmp > sum - tmp) break;
  }
  printf("%d\n", res);
  return 0;
}
