import Control.Monad
import Data.Maybe
import qualified Data.ByteString.Char8 as BS
import Data.List
import Data.Ord

readInt = fst . fromJust . BS.readInt
readIntList = map readInt . BS.words
getInt = readInt <$> BS.getLine
getIntList = readIntList <$> BS.getLine

main = do
    getLine
    as <- getIntList
    bs <- getIntList
    let ds = sortOn Down $ zipWith (-) as bs
        mds = filter (< 0) ds
        m = length mds
        p = length . takeWhile (< abs (sum mds)) $ scanl (+) 0 ds
    print $ if sum ds < 0 then -1 else m + p