#include <iostream>
using namespace std;
int main()
{ 
	long int n;
	double mod = 1000000007;
	cin >> n;
	double* x;
	x = new double [n];
	int i;
	double add = 0;
	double c = n - 1;
	for (i = 0;i < n;i++) {
		double a;
		cin >> a;
		fmod(a, mod);
		x[i] = a;
		add += a;
	}
	int r = add - x[0];
	double sum = 1;
	for (int i = 1; i <= n - 1; ++i)
	{
		sum *= i;
	}
	double j=r/c;
	cout << fmod(j*sum, mod);
	delete[] x;
}