N = int(input())
L = input().split()
n = int(input())
l = input().split()
dup = []
count = 0
for i in range(N):
    for j in range(n):
        if L[i] == l[j]:
            dup.append(L[i])
            break
dup = list(set(dup))
print(len(dup)) N = int(input()) N int(input()) int input() input L = input().split() L input().split() ().split () input split n = int(input()) n int(input()) int input() input l = input().split() l input().split() ().split () input split dup = [] dup [] count = 0 count 0 for i in range(N):
    for j in range(n):
        if L[i] == l[j]:
            dup.append(L[i])
            break i range(N) range N for j in range(n):
        if L[i] == l[j]:
            dup.append(L[i])
            break j range(n) range n if L[i] == l[j]:
            dup.append(L[i])
            break L[i] == l[j] L[i] L i l[j] l j dup.append(L[i]) dup.append dup append L[i] L i break dup = list(set(dup)) dup list(set(dup)) list set(dup) set dup print(len(dup)) print len(dup) len dup dup = [] [] dup dup = list(set(dup)) list(set(dup)) dup L = input().split() input().split() L n = int(input()) int(input()) n l = input().split() input().split() l N = int(input()) int(input()) N count = 0 0 count
N = int(input())
L = input().split()
n = int(input())
l = input().split()
dup = []
count = 0
for i in range(N):
    for j in range(n):
        if L[i] == l[j]:
            dup.append(L[i])
            break
dup = list(set(dup))
print(len(dup))
