Itachi Uchiha, is a prodigy and the strongest shinobi of all. However he is considered as a criminal who eliminated his entire clan to test limits of his powers.
However only a few surviving knows that he only thinks of 'Peace'. After seeing countless lives lost in battles, he will do whatever is needed to stop the war, even if it means to eliminate his own clan.
Itachi loves his brother Sasuke very much and wants him to become strong. His only dream is to make him surpass his own abilities. So, he always behaves like an enemy and force his brother to life-risking situations.
This time he went too far and give him an another do-or-die problem.
Problem:
You are given an array A of size n consiting of positive integers. Now from this array, construct an another array B of size n with element B[i] being sum of all elements of A excluding A[i]. Consider the following example.
Consider the array
A = [1 2 3 4 5]
Now
B[0] = 2 + 3 + 4 + 5 = 14
B[1] = 1 + 3 + 4 + 5 = 13
B[2] = 1 + 2 + 4 + 5 = 12
B[3] = 1 + 2 + 3 + 5 = 11
B[4] = 1 + 2 + 3 + 4 = 10
So B = [14 13 12 11 10]
Now Itachi wants his brother to find the sum of all elements of B. Can you help Sasuke to become strong.
Input:
The input consist of a postive integer n followed by an array A of positive integers.
Output:
Print the sum of all elements of all elements of the array B after obtained by method described above.
Constraint:
1 <= n <= 100000
1 <= A[i] <= 100 for all 1 <= i <= n
Note:
Answer will not fit into the limits of integer (int) use long long int for your variable that stores the answer.
format for scanf() and printf() using long long int :-
scanf("%lld", &n);
printf("%lld\n", &n);