n1 = int(input())
s = (input()).split()
n2 = int(input())
t = (input()).split()
m = []

for i in range(0, n2):
      key = t[i]
      for j in range(0, n1):
            if s[j] == t[i]:
                  m.append(s[j])
                  break
print(len(m)) n1 = int(input()) n1 int(input()) int input() input s = (input()).split() s (input()).split() input()).split input() input split n2 = int(input()) n2 int(input()) int input() input t = (input()).split() t (input()).split() input()).split input() input split m = [] m [] for i in range(0, n2):
      key = t[i]
      for j in range(0, n1):
            if s[j] == t[i]:
                  m.append(s[j])
                  break i range(0, n2) range 0 n2 key = t[i] key t[i] t i for j in range(0, n1):
            if s[j] == t[i]:
                  m.append(s[j])
                  break j range(0, n1) range 0 n1 if s[j] == t[i]:
                  m.append(s[j])
                  break s[j] == t[i] s[j] s j t[i] t i m.append(s[j]) m.append m append s[j] s j break print(len(m)) print len(m) len m key = t[i] t[i] key n1 = int(input()) int(input()) n1 m = [] [] m t = (input()).split() (input()).split() t n2 = int(input()) int(input()) n2 s = (input()).split() (input()).split() s
n1 = int(input())
s = (input()).split()
n2 = int(input())
t = (input()).split()
m = []

for i in range(0, n2):
      key = t[i]
      for j in range(0, n1):
            if s[j] == t[i]:
                  m.append(s[j])
                  break
print(len(m))