#include <bits/stdc++.h>
int main() {
  int n, arr[101] = {0}, i, j, sum, t, count, sum1;
  scanf("%d", &n);
  for (i = 0, sum = 0; i < n; i++) {
    scanf("%d", &arr[i]);
    sum += arr[i];
  }
  sum /= 2;
  for (j = 0; j < n; j++) {
    for (i = 0; i < n - j; i++) {
      if (arr[i] < arr[i + 1]) {
        t = arr[i];
        arr[i] = arr[i + 1];
        arr[i + 1] = t;
      }
    }
  }
  for (i = 0, count = 0, sum1 = 0; i <= n; i++) {
    if (sum1 > sum) {
      printf("%d", count);
      break;
    } else {
      sum1 += arr[i];
      count++;
    }
  }
  return 0;
}
