시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 64 MB 5 3 3 60.000%

문제

This task is inspired by the recent MH370 stolen passport incident.

The Interpol database contains a list of N stolen passport numbers. We have another list of M passport numbers to check if they are stolen or not.

입력

  • The first line of the input contains an integer N. (1 ≤ N ≤ 100,000)
  • The next N lines contains the list of N stolen passport numbers, one passport number per line.
  • The next line of the input contains an integer M. (1 ≤ M ≤ 100,000)
  • The next M lines contains the list of M passport numbers, one passport number per line.

Passport numbers are alphanumeric (combination of alphabetic and numeric characters) and are of length at most 15

출력

Output the total number of stolen passports in the list of M passports.

예제 입력

10
I220232074
D327045452
L261687170
H720628600
T181830847
I108428623
J316167657
M520837168
H364436380
J531555744
5
U133207838
D327045452
S374500074
U882158042
H364436380

예제 출력

2

힌트

Both D327045452 and H364436380 are stolen passports.