P11445 「ALFR Round 3」A Naughty Student

Background

In the school where Little Shan studies, there is a group of very naughty students. For example, when rating the teaching quality of their teachers, they seldom follow the requirements.

Description

The teaching quality competition is about to begin. Each student can rate one of the three major subject teachers (Chinese, math, and English) in their class. Each student should rate only one teacher. However, some students may rate multiple teachers or not rate any teacher at all. We call such students naughty students. Given the rating situation of the teachers in the three subjects, please determine the number of naughty students in Little Shan's class.

Input Format

The first line contains an integer $n$, indicating the total number of students in the class, with student IDs ranging from $1$ to $n$. The second line contains an integer $a$, which indicates that $a$ students have rated to the Chinese teacher. The third line contains $a$ integers, where the $i$-th integer $x_i$ indicates that the student with ID $x_i$ has rated to the Chinese teacher. The fourth line contains an integer $b$, indicating that $b$ students have rated to the math teacher. The fifth line contains $b$ integers, where the $i$-th integer $y_i$ indicates that the student with ID $y_i$ has rated to the math teacher. The sixth line contains an integer $c$, indicating that $c$ students have rated to the English teacher. The seventh line contains $c$ integers, where the $i$-th integer $z_i$ indicates that the student with ID $z_i$ has rated to the English teacher.

Output Format

Output a single integer representing the number of naughty students in Little Shan's class.

Explanation/Hint

In the sample, students with IDs $1, 2, 3, 4, 5$ have respectively rated of $2, 2, 3, 0, 1$ to the teachers. Thus, students with IDs $1, 2, 3,4$ are all naughty students, so the answer is $4$. | Subtask | Score | Constraints | | :-----: | :---: | :---------: | | $0$ | $10$ | $n=1$ | | $1$ | $20$ | All elements in the arrays $x, y, z$ are distinct | | $2$ | $10$ | $a=b=c=1$ | | $3$ | $10$ | $a=n, b=c=1$ | | $4$ | $20$ | Arrays $x, y, z$ are provided in ascending order | | $5$ | $30$ | - | For all the tests, $1 \leq n \leq 100$, $0 \leq a, b, c \leq n$, and $1 \leq x_i, y_i, z_i \leq n$. The arrays $x, y, z$ have no duplicate elements within themselves.