#include <bits/stdc++.h>
using namespace std;
int n, ans, seq[111], sum, now;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &seq[i]), sum += seq[i];
  }
  sum >>= 1;
  sort(seq + 1, seq + 1 + n, greater<int>());
  for (int i = 1; i <= n; i++) {
    now += seq[i];
    if (now > sum) {
      ans = i;
      break;
    }
  }
  if (ans == 0) ans = n;
  printf("%d\n", ans);
  return 0;
}
