Score : $200$ points
You are given sequences of length $N$ each: $A = (A_1, A_2, A_3, \dots, A_N)$ and $B = (B_1, B_2, B_3, \dots, B_N)$.
Find the number of integers $x$ satisfying the following condition:
Input is given from Standard Input in the following format:
$N$ $A_1$ $A_2$ $A_3$ $\dots$ $A_N$ $B_1$ $B_2$ $B_3$ $\dots$ $B_N$
Print the answer.
2 3 2 7 5
3
$x$ must satisfy both $3 \le x \le 7$ and $2 \le x \le 5$.
There are three such integers: $3$, $4$, and $5$.
3 1 5 3 10 7 3
0
There may be no integer $x$ satisfying the condition.
3 3 2 5 6 9 8
2