import Data.List

deflist :: [Int] -> [Int] -> [Int]
deflist [] [] = []
deflist [] _ = error "deflistError"
deflist _ [] = error "deflistError"
deflist (a:as) (b:bs) = (a-b) : (deflist as bs)

check :: Int -> [Int] -> Int
check _ [] = error "checkError"
check m (p:ps) = if m == 0 then 0
   else if (m+p) >= 0 then 1 else 1 + (check (m+p) ps)

main :: IO ()
main = do
   getLine
   as  <- map read.words <$> getLine
   bs  <- map read.words <$> getLine
   let defs = deflist as bs
       ms = filter (< 0) defs
       ps = reverse $ sort $ filter (> 0) defs
   if sum as < sum bs then print (-1)
     else do
       putStrLn $ show $ (check (sum ms) ps) + (length ms)
