import qualified Data.Map as M
import Data.List (sortBy)

split2 :: [a] -> ([a], [a])
split2 ns = helper ([], []) ns
  where helper (as, bs) (x:y:zs) = helper (x:as, y:bs) zs
        helper all _ = all

toMap :: [Int] -> M.Map Int Int
toMap ns = foldr (\a b -> M.insertWith (+) a 1 b) M.empty ns

mosts :: (Ord k, Ord v) => M.Map k v -> [(v, k)]
mosts m = sortBy (flip compare) $ map (\(a,b) -> (b,a)) (M.assocs m)

count :: Eq a => [(Int, a)] -> [(Int, a)] -> Int
count [] (b:bs) = fst b
count (a:as) [] = fst a
count (a:as) (b:bs) = if (snd a /= snd b)
                      then fst a + fst b
                      else max (count (a:as) bs) (count as (b:bs))

doMain :: String -> Int
doMain line = 2 * (length as) - (count as' bs')
  where (as, bs) = split2 . map read $ words line ::([Int], [Int])
        as' = mosts $ toMap as
        bs' = mosts $ toMap bs

main = do
  getLine
  line <- getLine
  print $ doMain line
