n = int(input())
S = input().split()
S.append(None)

q = int(input())
T = input().split()

cnt = 0

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

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

q = int(input())
T = input().split()

cnt = 0

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

print(cnt)