#K85472. Common Newspaper Subscribers

    ID: 36649 Type: Default 1000ms 256MiB

Common Newspaper Subscribers

Common Newspaper Subscribers

In this problem, you are given two lists representing the roll numbers of students who have subscribed to two different newspapers: one in English and the other in French. Your task is to find the number of students who have subscribed to both newspapers.

The input will be provided in a specific format where the first list corresponds to the English subscribers and the second list corresponds to the French subscribers. You need to compute and output the size of the intersection of these two sets.

inputFormat

The input is read from standard input (stdin) and follows the format below:

1. The first line contains an integer (n), the number of students subscribed to the English newspaper.
2. The second line contains (n) space-separated integers, representing the roll numbers of these students.
3. The third line contains an integer (m), the number of students subscribed to the French newspaper.
4. The fourth line contains (m) space-separated integers, representing the roll numbers of these students.

outputFormat

Output a single integer to standard output (stdout), which is the number of students who have subscribed to both newspapers.## sample

9
1 2 3 4 5 6 7 8 9
9
10 1 2 3 11 21 55 6 8
5