object Main extends App {
  val in = scala.io.Source.stdin.getLines.toSeq
  val in2 = in.map(_.split(' ').map(_.toLong).toIndexedSeq)
  val A = in2(1)
  val B = in2(2)
  
  private def func():Int = {
    val asum = A.sum
    val bsum = B.sum
    val dsum = asum - bsum
    if(dsum < 0) return -1
    if(A.indices.forall(i => A(i) >= B(i) )) return 0
    
    val d = A.indices.map(i => A(i) - B(i) )
    val dsorted = d.sorted
    
    var count=0
    var i=0
    var j=0
    var dtmp = dsum
    while(i < dsorted.size){
      //if(dsorted(i) > 0){
      //  count += 1
      //}
      if(dsorted(i) > 0){
        dtmp -= dsorted(i)
        if(dtmp > 0) count += 1
      }
      i += 1
      j -= 1
    }
	dsorted.size - count
  }
  val ret = func()
  println(ret)
}
