lines = int(input())
student = []
counter = 0

for i in range(lines):
    student.append(input())
for i in range(lines):
    temp = input()
    if temp == student[i]:
        counter += 1

print(counter)