You are given a sequence of _n_ integers S and a sequence of different _q_ integers T. Write a program which outputs C, the number of integers in T which are also in the set S.
n_num = int(input())
n_list = list(map(int, input().split()))
q_num = int(input())
q_list = list(map(int, input().split()))

for q in q_list:
	lower = 0
	higher = len(n_list) - 1
	m = (higher - lower) // 2

	while lower <= higher:
		if n_list[m] == q:
			print(q)
			break
		elif n_list[m] > q:
			higher = m - 1
			m = lower + (higher - lower) // 2
		else:
			lower = m + 1
			m = lower + (higher - lower) // 2


n_num = int(input())
n_list = list(map(int, input().split()))
q_num = int(input())
q_list = list(map(int, input().split()))

count = 0
for q in q_list:
	lower = 0
	higher = len(n_list) - 1
	m = (higher - lower) // 2

	while lower <= higher:
		if n_list[m] == q:
			count += 1
			break
		elif n_list[m] > q:
			higher = m - 1
			m = lower + (higher - lower) // 2
		else:
			lower = m + 1
			m = lower + (higher - lower) // 2

print(count)
