The first line is an integer n (1 <= n <= 100000).
The second line consists of n integer a[1],a[2],...,a[n] where a[i] <= 100000 for 1<=i<=n.
An integer answer for the problem.
The answer can be quite large that you may use long long in C++ or the similar in other languages.