n = int(input())
S = list(map(int, input().split()))
S.append(0)
q = int(input())
T = list(map(int, input().split()))
N = 0
for t in T:
    i = 0
    S[n] = t
    while S[i] != t:
        i += 1
    if i != n:
        N += 1
print(N) n = int(input()) n int(input()) int input() input S = list(map(int, input().split())) S list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split S.append(0) S.append S append 0 q = int(input()) q int(input()) int input() input T = list(map(int, input().split())) T list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split N = 0 N 0 for t in T:
    i = 0
    S[n] = t
    while S[i] != t:
        i += 1
    if i != n:
        N += 1 t T i = 0 i 0 S[n] = t S[n] S n t while S[i] != t:
        i += 1
     S[i] != t S[i] S i t i += 1 i 1 if i != n:
        N += 1 i != n i n N += 1 N 1 print(N) print N T = list(map(int, input().split())) list(map(int, input().split())) T N = 0 0 N i = 0 0 i n = int(input()) int(input()) n q = int(input()) int(input()) q S = list(map(int, input().split())) list(map(int, input().split())) S i += 1 1 i N += 1 1 N
n = int(input())
S = list(map(int, input().split()))
S.append(0)
q = int(input())
T = list(map(int, input().split()))
N = 0
for t in T:
    i = 0
    S[n] = t
    while S[i] != t:
        i += 1
    if i != n:
        N += 1
print(N)
