object Main {
    def main(args: Array[String]) = {
        val List(a, b, c) = io.Source.stdin.getLines.toList.tail.map(_.split(" ").map(_.toInt).tail)
        println((c diff a).size + (a intersect b intersect c).size)
    }
}

