#Lutece3305. Calculate Probability

Calculate Probability

Description

Batman is caught by the Joker, but Joker does not want to kill Batman directly, he wants to play a game with Batman. Now Batman has a non-decreasing array AA of length nn. Joker has a non-decreasing array BB of length mm. Joker asks Batman to choose a number aa randomly from array AA. Meanwhile he chooses a number bb randomly from array BB. If a>ba>b , Joker will let Batman go. Batman now wants to know how many scenarios he could survive.

Input

The first line contains two integers nn and mm (1n,m1061 \leq n, m \leq 10^6).

The second line contains nn integers a1,a2,,ana_1, a_2, \ldots, a_n (0a1...an1060 \leq a_1 \leq ... \leq a_n \leq 10^6).

The third line contains mm integers b1,b2,,bmb_1, b_2,\ldots ,b_m (0b1...bm1060 \leq b_1 \leq ... \leq b_m \leq 10^6).

Output

Print one integer, indicating the number of the scenarios he could survive.

Samples

5 5
2 3 4 5 6
1 2 3 4 5
15

Note

The answer may exceed the int range.

Resources

电子科技大学第十三届 ACM 趣味程序设计竞赛