#include <bits/stdc++.h>
using namespace std;
long long fac(long long k) {
  long long sum = 1;
  for (int i = 1; i <= k; ++i) {
    sum *= i;
  }
  return sum;
}
int main(void) {
  long long n;
  cin >> n;
  long long x[n];
  long long sum[n];
  long long store[n];
  for (int i = 0; i < n; i++) {
    cin >> x[i];
  }
  for (int i = 0; i < n - 1; i++) {
    store[i] = x[n - 1] - x[i];
    if (i >= 1)
      sum[i] = sum[i - 1] + store[i];
    else
      sum[0] = store[0];
  }
  double result = 0.0;
  for (int i = 0; i < n - 1; i++) {
    result += double(double(sum[i]) / double((n - 1)));
  }
  cout << int(result * fac(n - 1)) % 1000000007 << endl;
}
