Problem:
Search I

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.

Input

In the first line n is given. In the second line, n integers are given. In the third line q is given. Then, in the fourth line, q integers are given.

Output

Print C in a line.

Constraints

n ≤ 10000

q ≤ 500

0 ≤ an element in S ≤ 109

0 ≤ an element in T ≤ 109

Sample Input 1

5
1 2 3 4 5
3
3 4 1

Sample Output 1

3

Sample Input 2

3
3 1 2
1
5

Sample Output 2

0

Sample Input 3

5
1 1 2 2 3
2
1 2

Sample Output 3

2

Notes

Solution in JavaScript (judge verdict: Accepted)

(function() {
    'use strict';

    var fs = require('fs');
    var contents = fs.readFileSync('/dev/stdin', 'utf-8');

    var search = function(contents) {
        var S = [];
        var n = 0;
        var q = 0;
        var C = 0;
        var t = 0;

        var lines = contents.trim().split("\n");
        n = parseInt(lines[0]);
        S.length = n;
        var a = lines[1].split(" ");
        for (var i = 0; i < a.length; i++) {
            S[i] = parseInt(a[i]);
        }

        q = parseInt(lines[2]);
        var T = lines[3].split(" ");
        for (var i = 0; i < q; i++) {
            t = parseInt(T[i]);
            for (var j = 0; j < n; j++) {
                if (t == S[j]) {
                    C++;
                    break;
                }
            }
        }
        console.log(C);
    }
    search(contents);
})();