Recently, Vasya learned how to calculate the number of inversions in a given permutation using Fenwick tree. However, Petya considers it an easy problem, so he decided to make a harder one. Petya asked Vasya to calculate the number of inversions such that the elements divide one another evenly. Formally, for the given permutation (p_1,p_2,…,p_n), the task is to find the number of pairs of indices (i,j) such that i<j and p_i is a multiple of p_j.
Help Vasya solve this problem.
The first line contains an integer n, the length of the permutation (1≤n≤100,000). The second line contains n space-separated integers p_i. It is guaranteed that the given integers form a permutation of integers from 1 to n.
Print one integer: the number of divisible inversions in the given permutation.