n = input()

S = map(int, raw_input().split())

q = input()

T = map(int, raw_input().split())

S.append(0)
cnt = 0
for i in range(q):
    j = 0
    S[n] = T[i]
    while S[j] != S[n]:
        j = j + 1
    if j != n:
        cnt = cnt + 1


print cnt n = input() n input() input S = map(int, raw_input().split()) S map(int, raw_input().split()) map int raw_input().split() ().split () raw_input split q = input() q input() input T = map(int, raw_input().split()) T map(int, raw_input().split()) map int raw_input().split() ().split () raw_input split S.append(0) S.append S append 0 cnt = 0 cnt 0 for i in range(q):
    j = 0
    S[n] = T[i]
    while S[j] != S[n]:
        j = j + 1
    if j != n:
        cnt = cnt + 1 i range(q) range q j = 0 j 0 S[n] = T[i] S[n] S n T[i] T i while S[j] != S[n]:
        j = j + 1
     S[j] != S[n] S[j] S j S[n] S n j = j + 1 j j + 1 j 1 if j != n:
        cnt = cnt + 1 j != n j n cnt = cnt + 1 cnt cnt + 1 cnt 1 print cnt = 0 0 cnt n = input() input() n cnt = cnt + 1 cnt + 1 cnt q = input() input() q T = map(int, raw_input().split()) map(int, raw_input().split()) T j = 0 0 j S = map(int, raw_input().split()) map(int, raw_input().split()) S j = j + 1 j + 1 j
n = input()

S = map(int, raw_input().split())

q = input()

T = map(int, raw_input().split())

S.append(0)
cnt = 0
for i in range(q):
    j = 0
    S[n] = T[i]
    while S[j] != S[n]:
        j = j + 1
    if j != n:
        cnt = cnt + 1


print cnt