text: n,*a=map(int,open(0).read().split())
  a.sort()
  r=[]
  rs=0
  for an in a:
      rs+=an
      r.append(rs)
  ans=1 # lsat one should be counted here
  for i in range(n-2,-1,-1):
      if r[i]*2>=a[i+1]:
          ans+=1
      else:
          break
  print(ans)
  