fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    val l = (0..2).map { readLine()!!.map { it } }
    print((0 until n).map { listOf(l[0][it], l[1][it], l[2][it]).distinct().size - 1 }.sum())
}