#P11445. 「ALFR Round 3」A 调皮的学生

「ALFR Round 3」A 调皮的学生

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 nn, indicating the total number of students in the class, with student IDs ranging from 11 to nn.

The second line contains an integer aa, which indicates that aa students have rated to the Chinese teacher.

The third line contains aa integers, where the ii-th integer xix_i indicates that the student with ID xix_i has rated to the Chinese teacher.

The fourth line contains an integer bb, indicating that bb students have rated to the math teacher.

The fifth line contains bb integers, where the ii-th integer yiy_i indicates that the student with ID yiy_i has rated to the math teacher.

The sixth line contains an integer cc, indicating that cc students have rated to the English teacher.

The seventh line contains cc integers, where the ii-th integer ziz_i indicates that the student with ID ziz_i has rated to the English teacher.

Output Format

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

5
3
2 3 5
2
3 1
3
1 2 3
4

Hint

In the sample, students with IDs 1,2,3,4,51, 2, 3, 4, 5 have respectively rated of 2,2,3,0,12, 2, 3, 0, 1 to the teachers. Thus, students with IDs 1,2,3,41, 2, 3,4 are all naughty students, so the answer is 44.

Subtask Score Constraints
00 1010 n=1n=1
11 2020 All elements in the arrays x,y,zx, y, z are distinct
22 1010 a=b=c=1a=b=c=1
33 a=n,b=c=1a=n, b=c=1
44 2020 Arrays x,y,zx, y, z are provided in ascending order
55 3030 -

For all the tests, 1n1001 \leq n \leq 100, 0a,b,cn0 \leq a, b, c \leq n, and 1xi,yi,zin1 \leq x_i, y_i, z_i \leq n. The arrays x,y,zx, y, z have no duplicate elements within themselves.