#include <bits/stdc++.h>
using namespace std;
const int MaxN = 105;
int N, A[MaxN], S, Cur;
bool cmp(int a, int b) { return a > b; }
int main() {
  scanf("%d", &N);
  for (int i = 1; i <= N; ++i) scanf("%d", &A[i]);
  for (int i = 1; i <= N; ++i) S += A[i];
  sort(A + 1, A + N + 1, cmp);
  for (int i = 1; i <= N; ++i) {
    Cur += A[i];
    if (S - Cur - A[i] < 0) {
      printf("%d", i);
      break;
    }
    S -= A[i];
  }
  return 0;
}
