C. Bashy Math
time limit per test
2.5 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

When Gunga was 3 years old, he got extremely interested in both math and coding. One day, he found a bashy number theory problem when he was preparing for a math competition, and he decided to solve it by programming. The problem can be generalized as follows:

Given an array with $$$n$$$ integers $$$a_1,a_2,\dots,a_n$$$, find the number of ordered pairs $$$(i,j)$$$ such that $$$1\le i,j\le n,i\neq j$$$ and $$$a_i$$$ is a multiple of $$$a_j$$$.

Input

The first line contains an integer $$$n$$$ $$$(1\le n\le 2\times10^5)$$$ - the number of elements in the array.

The second line contains $$$n$$$ integers $$$a_1,a_2,\dots,a_n$$$ $$$(1\le a_i\le 5\times10^5)$$$ - elements of the array $$$a$$$.

Output

Print a single integer - the number of ordered pairs that satisfied the constraints.

Example
Input
5
1 2 3 4 5
Output
5
Note

In the first example, there are $$$5$$$ pairs, $$$(2,1),(3,1),(4,1),(5,1)$$$, and $$$(4,2)$$$.