J. Joyful Synchronization
time limit per test
0.5 seconds
memory limit per test
1024 megabytes
input
standard input
output
standard output

It is Carnaval in Salvador, and a bloco afro is about to parade down the slopes of the Pelourinho with its unmistakable samba-reggae groove.

The bloco is formed by $$$N$$$ pairs of percussionists. In the $$$i$$$-th pair, the surdo player strikes $$$A_i$$$ beats per measure, while the caixa player next to them strikes $$$B_i$$$ beats per measure. For the whole bloco to lock into a single, hypnotic groove all the way to the Largo do Pelourinho, the maestro wants every pair to produce the same total number of beats per measure.

Formally, the maestro picks a target value $$$C$$$ and wants $$$A_i + B_i = C$$$ to hold for every pair $$$i$$$. He is free to choose any $$$C$$$ he likes.

To achieve that, he can call rehearsals. In a single rehearsal he picks one drummer (either the surdo or the caixa of any pair) and retunes their pattern to play exactly $$$X$$$ beats per measure, where $$$X$$$ is any integer with $$$1 \leq X \leq 10^{9}$$$. Notice each rehearsal may use a different value of $$$X$$$.

Help the maestro find the minimum number of rehearsals needed so that all the pairwise sums become equal.

Input

The first line contains a single integer $$$N$$$ ($$$2 \leq N \leq 10^{5}$$$), the number of pairs.

The second line contains $$$N$$$ integers $$$A_1, A_2, \ldots, A_N$$$ ($$$1 \leq A_i \leq 10^{6}$$$).

The third line contains $$$N$$$ integers $$$B_1, B_2, \ldots, B_N$$$ ($$$1 \leq B_i \leq 10^{6}$$$).

Output

Output a single integer: the minimum number of rehearsals so that $$$A_i + B_i$$$ is the same for every pair.

Examples
Input
3
1 2 3
5 4 3
Output
0
Input
5
2 2 5 8 3
3 3 2 1 9
Output
3
Note

Explanation for example 1

The pairwise sums are $$$1+5=6$$$, $$$2+4=6$$$ and $$$3+3=6$$$. They are already all equal, so the maestro needs no rehearsals.

Explanation for example 2

The current sums are $$$5, 5, 7, 9, 12$$$. Choosing the target $$$C = 5$$$, pairs $$$1$$$ and $$$2$$$ are already fine. Each of pairs $$$3$$$, $$$4$$$ and $$$5$$$ can be fixed with a single rehearsal (for example, retune the surdo of pair $$$3$$$ from $$$5$$$ to $$$3$$$, the surdo of pair $$$4$$$ from $$$8$$$ to $$$4$$$, and the caixa of pair $$$5$$$ from $$$9$$$ to $$$2$$$). No choice of $$$C$$$ does better than $$$3$$$ rehearsals.