Practice on Toph

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

Submit Dile AC Hobe Na

By aumit_se · Limits 1s, 512 MB

Competitive Programming is very popular in Bangladesh. Shuvo is a contestant from DIU-SWE. His department is going to organize a Programming Contest for the junior contestant. Now Shuvo has to set a problem for the contest.

As Shuvo is an intelligent contestant, he wants to set a difficult problem as if no one can solve the problem. After thinking a few hours he gets a great idea of the problem.

Now think that there are N people in two groups and every person have an ID Number (1<=ID Number<=100). The groups are created by the people according to their behaviors. In this problem, you have to count the number of Common ID in two groups.

Input

The first line contains one integer N (1<=N<=100) – the number of People in each group.

The second line contains ID Numbers of N People from the first group.

The third line contains ID Numbers of N People from the second group.

Output

Print one integer – the number of Common ID from two groups.

Samples

InputOutput
5
1  3  6  15  21
3  8  15  19 25
2
InputOutput
1
43 
69 
0

Note

In the first sample case the answer will be 2 because 3 and 15 are the common numbers in the two groups.

In the second sample case there don’t have any common number. So answer will be 0.

    Discussion

    Statistics


    97% Solution Ratio

    hamza05Earliest, Apr '18

    sbduke73Fastest, 0.0s

    TSRaihanLightest, 0 B

    XuhayerShortest, 83B

    Submit

    Login to submit

    Editorial

    Count the common numbers from two groups.