#include <bits/stdc++.h>
using namespace std;
int n;
int a[101];
int s = 0, d = 0;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    s += a[i];
  }
  sort(a, a + n);
  for (int i = n - 1; i >= 0; i--) {
    d += a[i];
    if (d > s - d) {
      printf("%d\n", n - i);
      return 0;
    }
  }
  return 0;
}
