main = do
  n <- getLine
  s1 <- getLine
  s2 <- getLine
  s3 <- getLine
  putStrLn . show $ solve (s1,s2,s3)

solve :: (String,String,String) -> Int
solve ([],_,_) = 0
solve ((c1:s1), (c2:s2), (c3:s3)) = (compare3 c1 c2 c3) + solve (s1,s2,s3)


compare3 :: Char -> Char -> Char -> Int
compare3 a b c
  | a == b && b == c = 0
  | a == b && b /= c = 1
  | b == c && a /= b = 1
  | c == a && a /= b = 1
  | otherwise = 2
