import java.io.BufferedReader
import java.io.InputStreamReader
import java.io.PrintWriter
import kotlin.math.min

val br = BufferedReader(InputStreamReader(System.`in`))
val out = PrintWriter(System.out)

fun main() {
    br.use { out.use {
        solve()
        out.flush()
    } }
}

fun solve() {
    val n = readInteger()
    val aList = readLongList()
    val bList = readLongList()

    val aSum = aList.sum()
    val bSum = bList.sum()
    if (aSum < bSum) {
        out.println(-1)
        return
    }

    val diffList = LongArray(n)
    for (i in 0 until n) {
        diffList[i] = aList[i] - bList[i]
    }
    diffList.sortDescending()

    // 4 -1 -1
    var minus = diffList.filter { it < 0 }.sum()
    val minusCount = diffList.count { it < 0 }
    var ans = 0
    while (minus < 0) {
        minus += diffList[ans]
        ans++
    }
    out.println(minusCount + ans)
}

fun readInteger() = Integer.parseInt(br.readLine())
fun readLong() = java.lang.Long.parseLong(br.readLine())
fun readStringList() = br.readLine()!!.split(' ')
fun readIntegerList() = readStringList().map(Integer::parseInt)
fun readLongList() = readStringList().map(java.lang.Long::parseLong)
fun readDoubleList() = readStringList().map(java.lang.Double::parseDouble)
