B. Baby Baraa in ALBAIK
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

One day, $$$Baby$$$ $$$Baraa$$$ was in $$$Saudi$$$ $$$Arabia$$$. He went to his favourite restaurant $$$ALBAIK$$$.

$$$ALBAIK$$$ is a restaurant that sells $$$n$$$ chickens; the size of the $$$i$$$-th chicken is $$$a_i$$$.

Actually, $$$Baby$$$ $$$Baraa$$$ was not hungry, so he decided to play with these chickens.

For each chicken $$$i$$$, $$$Baby$$$ $$$Baraa$$$ will count how many chickens after this chicken, according to their order, have a smaller size than the $$$i$$$-th chicken.

More formally, for each $$$(1 ≤ i ≤ n)$$$, he will count how many $$$j$$$ such that $$$(j \gt i)$$$ and $$$a_i \gt a_j$$$.

As $$$Baby$$$ $$$Baraa$$$ became hungry, now he wants you to play this game.

Input

The first line contains one integer $$$n$$$ $$$(1≤n≤2⋅10^5)$$$.

The second line contains $$$n$$$ integers $$$a_1,a_2,…,a_n$$$ $$$(1≤a_i≤100)$$$ — the sizes of the $$$n$$$ chickens.

Output

Output a single integer — the answer to the game.

Example
Input
6
4 5 3 1 6 2
Output
9
Note

The $$$9$$$ pairs are $$$(4, 3), (4, 1), (4, 2), (5, 3), (5, 1), (5, 2), (3, 1), (3, 2), (6, 2)$$$