#include <bits/stdc++.h>
using namespace std;
template <class T, class U>
ostream& operator<<(ostream& os, const pair<T, U>& p) {
  os << "(" << p.first << ", " << p.second << ")";
  return os;
}
template <class T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  os << "{";
  for (int i = 0; i < (int)v.size(); i++) {
    if (i) os << ", ";
    os << v[i];
  }
  os << "}";
  return os;
}
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
void __print(int x) { cerr << x; }
void __print(long x) { cerr << x; }
void __print(long long x) { cerr << x; }
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char* x) { cerr << '\"' << x << '\"'; }
void __print(const string& x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V>& x) {
  cerr << '{';
  __print(x.first);
  cerr << ',';
  __print(x.second);
  cerr << '}';
}
template <typename T>
void __print(const T& x) {
  int f = 0;
  cerr << '{';
  for (auto& i : x) cerr << (f++ ? "," : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
const long long modb = 1000000007;
const long long inf = 0x3f3f3f3f3f3f3f3fLL;
const double oo = 1e15;
const double eps = 1e-8;
const double pi = acos(-1.0);
inline long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
inline long long lcm(long long a, long long b) { return (a * b) / gcd(a, b); }
inline bool isPerfectSquare(long long x) {
  long long s = sqrt(x);
  return (s * s == x);
}
inline bool isFibonacci(long long n) {
  return isPerfectSquare(5 * n * n + 4) || isPerfectSquare(5 * n * n - 4);
}
inline long long add(long long a, long long b) {
  a += b;
  if (a >= modb) return a - modb;
  return a;
}
inline long long sub(long long a, long long b) {
  a -= b;
  if (a < 0) return a + modb;
  return a;
}
inline long long mul(long long a, long long b) {
  return ((((a % modb) * (b % modb)) % modb) + modb) % modb;
}
inline long long numofdig(long long i) {
  return i > 0 ? (long long)log10l((long double)i) + 1 : 1;
}
long long pwr(long long a, long long b) {
  a %= modb;
  long long ans = 1;
  while (b) {
    if (b & 1) ans = (ans * a) % modb;
    a = (a * a) % modb;
    b >>= 1;
  }
  return ans;
}
const long long N = 1e5 + 5;
long double x[N], d[N], fact[N];
long long a[N];
long long n;
long double fun(long long k) {
  if (k == n) return 0;
  long double ans = 0;
  for (long long i = 1; i <= (n - 1); ++i) {
    if (a[i] == 0) {
      if (i != 1) d[i - 1] += d[i];
      a[i] = 1;
      ans += d[i] + fun(k + 1);
      if (i != 1) d[i - 1] -= d[i];
      a[i] = 0;
    }
  }
  ans *= (1 / (long double)(n - k));
  if (ans >= modb) ans -= (long double)modb;
  return ans;
}
int32_t main() {
  ios ::sync_with_stdio(0), cin.tie(0), cout.tie(0),
      cin.exceptions(cin.failbit);
  long long t = 1;
  fact[0] = 1, fact[1] = 1;
  for (long long i = 2; i <= (N - 1); ++i) {
    fact[i] = fact[i - 1] * ((long double)i);
  }
  for (long long tc = 0; tc < (t); ++tc) {
    cin >> n;
    for (long long i = 0; i < (n); ++i) {
      cin >> x[i];
      if (i != 0) d[i] = x[i] - x[i - 1];
    }
    long double ans = 0;
    memset(a, 0, sizeof(a));
    for (long long i = 1; i <= (n - 1); ++i) {
      if (i != 1) d[i - 1] += d[i];
      a[i] = 1;
      ans += (1 / (long double)(n - 1)) * (d[i] + fun(2));
      if (i != 1) d[i - 1] -= d[i];
      a[i] = 0;
    }
    ans *= fact[n - 1];
    long long aa = (long long)ans;
    aa %= modb;
    cout << aa << "\n";
  }
  cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
  return 0;
}
