array-play
Source: hackerearth
Difficulty: UNKNOWN_DIFFICULTY

Dolly is very fond of arrays and  has got two arrays A and B. she takes these arrays to Lovish and ask him to calculate the total number of  pairs such that A[i]>B[j] and i < j.

Help Lovish calculate the answer.

Input Format:

First line contains n denoting the total number of elements.The next line contains n space separated integers of array A.This line is again followed by n space separated integers of array B.

Output Format:

Print the total number of pairs satisfying the above condition.

Constraints:

1 ≤ n ≤ 200000

1 ≤ A[i] ≤ 10^6

1 ≤ B[i] ≤ 10^6

SAMPLE INPUT
3
5 6 7
1 2 3

SAMPLE OUTPUT
3

Explanation

possible pairs could be (5,2) , (5,3) and (6,3)