St Andrews Online Judge

Kay's Favourite Numbers

By Kay Akashi

Time: 1000 ms
Memory: 256000 kB

The code judging system is only available during contests. Check out the github repo for test cases and solutions.

Please log in.

Problem Statement

You're given an integer array aa consisting of nn distinct integers a1a_{1}, …, ana_{n}, Kay's favourite numbers. Then you're given an integer array bb consisting of integers b1b_{1}, …, bnb_{n}. Count the number of ii (1in)(1 \leq i \leq n) such that bib_{i} is one of Kay's favourite numbers.

Note that, bb doesn't necessarily consist of distinct integers.

Constraints

1n1051 \leq n \leq 10^{5}.

Subtask 1 (20%)

1n<1001 \leq n \lt 100. No element in aa and bb is larger than 200200 and smaller than 11.

Subtask 2 (80%)

100n105100 \leq n \leq 10^{5}. No element in aa and bb is larger than 10710^{7} and smaller than 11.

Input

The first line contains one number, nn. The second line contains nn numbers, which is an array aa. The third line also contains nn numbers, which is an array bb.

Output

Output the answer.

Examples

Input

3
1 7 9
4 9 9

Output

2

Explanation

i=2,3i = 2, 3 meet the condition since 99 is one of Kay's favourite numbers. Hence the answer is 22.

Input

3
1 2 3
3 2 1

Output

3

Explanation

i=1,2,3i = 1, 2, 3 meet the condition hence the answer is 33.