import Data.List

getter::IO ([Int],[Int])
getter = do
   dat<-(return.(map read).words)=<<getLine
   return (eat ([],[]) dat)
      where eat (x,y) []        = (x,y)
            eat (x,y) (z:w:rest)= eat (z:x,w:y) rest

solver::Int->[Int]->[Int]->Int
solver n xs ys = let (x_head:x_rest) = ((sortBy (\ x-> \ y ->compare (length y) (length x))).group.sort) xs in
                 let (y_head:y_rest) = ((sortBy (\ x-> \ y ->compare (length y) (length x))).group.sort) ys in
                 if head x_head /= head y_head then n - ((length x_head)+(length y_head))
                                               else let x_loss = (length x_head) - ((length.head) x_rest) in
                                                    let y_loss = (length y_head) - ((length.head) y_rest) in
                                                    n - ((length x_head)+(length y_head)+(max x_loss y_loss))

main::IO()
main=do
  n<-(return.read)=<<getLine
  (x,y)<-getter
  print (solver n x y)