You are given an array a1, a2, ..., an of size N and the following expression:
Find the value of the provided expression modulus 1000000007.
Input format
Output format
Find the value of the above expression modulus 1000000007.
Constraints
2≤N≤1051≤a[i]≤106
The expansion of the given expression for this array is:
1∗2+2∗3+3∗4=20