#00003F

z-zurka

Mr. Little Z has decided to start a music group and tour the world, so he invited three of his best friends. However, his friends are very busy with their studies. To solve this problem, they each gave Mr. Little Z a list of the cities they are able to visit that won't cost too much money or waste too much time. On each list there are at most 1000 cities.


Help Mr. Little Z find all the cities that all of his friends are able to visit.


InputThe first line of the standard input contains a number N1 corresponding to the number of cities on the list the first friend gave to Mr. Little Z. After that, in the second line there are N1 numbers in the range [1..2000000000] separated with one blank space, representing the cities on the list of the first friend. After that, you are given a number N2 , and also for a number N2 , you are given N2 numbers representing cities on the list of the second friend. Finally, you are given an input number N3 and N3 cities from the list of the third friend. Each list will not contain the same city more than once.

OutputTo the standard output, write one number K, that represents the number of cities that all three friends can visit.

Input:
3
1 2 3
3
2 3 4
4
1 2 3 4

Output:
2
Explanation: All the friends can visit cities number 2 and number 3.

Submit solution

Coming later

The grading service will be connected in a later migration step. You can inspect the task and your previous results now.