#include <bits/stdc++.h>
int main() {
  int n, a[100], i, j, k, t, x = 0, s = 0, p = 0;
  double h;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  for (i = 0; i < n; i++) {
    s = s + a[i];
  }
  for (j = 0; j < n - 1; j++) {
    for (k = 0; k < n - 1 - j; k++) {
      if (a[k] > a[k + 1]) {
        t = a[k + 1];
        a[k + 1] = a[k];
        a[k] = t;
      }
    }
  }
  i = n - 1;
  h = (double)s;
  while (p <= h / 2) {
    p = p + a[i];
    x++;
    i--;
  }
  printf("%d", x);
  return 0;
}
