import Data.List

main :: IO ()
main = do
    -- read inputs
    _ <- getLine
    as <- (map read) . words <$> getLine
    bs <- (map read) . words <$> getLine
    let ds = zipWith (-) as bs
        ds' = reverse . sort . (filter (>=0)) $ ds
        ds'' = filter (<0) ds
        numNotEnough = length ds''
        scoreNotEnough = negate . sum $ ds''
        scoreEnough = sum ds'
    if scoreEnough >= scoreNotEnough 
        then print $ numNotEnough + calcNumEnough ds' scoreNotEnough
        else print $ -1

calcNumEnough :: [Int] -> Int -> Int
calcNumEnough [] y
    | y <= 0 = 0
    | otherwise = error "something is wrong."
calcNumEnough (x:xs) y
    | y <= 0 = 0
    | otherwise = 1 + calcNumEnough xs (y - x)