cnt=0
n=int(input())
S=[0 for i in range(n)]
S=input().split()
q=int(input())
T=[0 for i in range(q)]
T=input().split()
for i in range(q):
    p=0
    for j in range(n):
        if T[i]==S[j]:
            if p==0:
                cnt+=1
                p+=1
print(cnt) cnt=0 cnt 0 n=int(input()) n int(input()) int input() input 0 for i in range(n) for i in range(n) i range(n) range n for i in range(n) 0 S=[0 for i in range(n)] S [0 for i in range(n)] S=input().split() S input().split() ().split () input split q=int(input()) q int(input()) int input() input 0 for i in range(q) for i in range(q) i range(q) range q for i in range(q) 0 T=[0 for i in range(q)] T [0 for i in range(q)] T=input().split() T input().split() ().split () input split for i in range(q):
    p=0
    for j in range(n):
        if T[i]==S[j]:
            if p==0:
                cnt+=1
                p+=1 i range(q) range q p=0 p 0 for j in range(n):
        if T[i]==S[j]:
            if p==0:
                cnt+=1
                p+=1 j range(n) range n if T[i]==S[j]:
            if p==0:
                cnt+=1
                p+=1 T[i]==S[j] T[i] T i S[j] S j if p==0:
                cnt+=1
                p+=1 p==0 p 0 cnt+=1 cnt 1 p+=1 p 1 print(cnt) print cnt S=[0 for i in range(n)] [0 for i in range(n)] S T=[0 for i in range(q)] [0 for i in range(q)] T p=0 0 p q=int(input()) int(input()) q cnt+=1 1 cnt S=input().split() input().split() S n=int(input()) int(input()) n T=input().split() input().split() T cnt=0 0 cnt p+=1 1 p
cnt=0
n=int(input())
S=[0 for i in range(n)]
S=input().split()
q=int(input())
T=[0 for i in range(q)]
T=input().split()
for i in range(q):
    p=0
    for j in range(n):
        if T[i]==S[j]:
            if p==0:
                cnt+=1
                p+=1
print(cnt)
