input()
S = set(input().split())
input()
print(len([s for s in input().split() if s in S])) input() input S = set(input().split()) S set(input().split()) set input().split() ().split () input split input() input s for s in input().split() if s in S for s in input().split() if s in S s input().split() ().split () input split s in S s S if s in S s print(len([s for s in input().split() if s in S])) print len([s for s in input().split() if s in S]) len [s for s in input().split() if s in S] S = set(input().split()) set(input().split()) S
input()
S = set(input().split())
input()
print(len([s for s in input().split() if s in S]))
