n = int(input())
S = [int(i) for i in input().split()] + [0]
q = int(input())
T = [int(i) for i in input().split()]
c = 0

for i in T:
    S[n] = i
    j = 0
    while i != S[j]:
        j += 1
    if j != n:
        c += 1

print(c) n = int(input()) n int(input()) int input() input int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i S = [int(i) for i in input().split()] + [0] S [int(i) for i in input().split()] + [0] [int(i) for i in input().split()] [0] 0 q = int(input()) q int(input()) int input() input int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i T = [int(i) for i in input().split()] T [int(i) for i in input().split()] c = 0 c 0 for i in T:
    S[n] = i
    j = 0
    while i != S[j]:
        j += 1
    if j != n:
        c += 1 i T S[n] = i S[n] S n i j = 0 j 0 while i != S[j]:
        j += 1
     i != S[j] i S[j] S j j += 1 j 1 if j != n:
        c += 1 j != n j n c += 1 c 1 print(c) print c j += 1 1 j T = [int(i) for i in input().split()] [int(i) for i in input().split()] T S = [int(i) for i in input().split()] + [0] [int(i) for i in input().split()] + [0] S c = 0 0 c n = int(input()) int(input()) n c += 1 1 c j = 0 0 j q = int(input()) int(input()) q
n = int(input())
S = [int(i) for i in input().split()] + [0]
q = int(input())
T = [int(i) for i in input().split()]
c = 0

for i in T:
    S[n] = i
    j = 0
    while i != S[j]:
        j += 1
    if j != n:
        c += 1

print(c)