There are N slimes standing on a number line. The i-th slime from the left is at position x_i.

It is guaruanteed that 1 \leq x_1 < x_2 < \ldots < x_N \leq 10^{9}.

Niwango will perform N-1 operations. The i-th operation consists of the following procedures:

* Choose an integer k between 1 and N-i (inclusive) with equal probability.
* Move the k-th slime from the left, to the position of the neighboring slime to the right.
* Fuse the two slimes at the same position into one slime.



Find the total distance traveled by the slimes multiplied by (N-1)! (we can show that this value is an integer), modulo (10^{9}+7). If a slime is born by a fuse and that slime moves, we count it as just one slime.

Constraints

* 2 \leq N \leq 10^{5}
* 1 \leq x_1 < x_2 < \ldots < x_N \leq 10^{9}
* x_i is an integer.

Input

Input is given from Standard Input in the following format:


N
x_1 x_2 \ldots x_N


Output

Print the answer.

Examples

Input

3
1 2 3


Output

5


Input

12
161735902 211047202 430302156 450968417 628894325 707723857 731963982 822804784 880895728 923078537 971407775 982631932


Output

750927044
#include <bits/stdc++.h>
using namespace std;
 
typedef pair<int,int> pii;
typedef long long ll;

void fastStream(){cin.tie(0);std::ios_base::sync_with_stdio(0);}

/*
  各スライムの移動距離の期待値を求めれば良い？
  あるスライムが移動する時、移動先が残っている確率を求めたい
  

 */

// O(logn)で繰り返し二乗法によりnum^p%modを計算
ll mod_pow(ll num,ll p,ll mod){
  ll mul=num;
  ll res=1;
  while(p){
    if(p%2)res=(res*mul)%mod;
    p/=2;
    mul=(mul*mul)%mod;
  }
  return res;
}
// fermerの小定理を用いてmodの割算を計算
ll div_mod(ll num,ll mod){
  return mod_pow(num,mod-2,mod);
}


const int mod = 1000000000 + 7;
int N;
ll X[100010];

int main(){

    cin >> N;
    for(int i = 0; i < N; i++) cin >> X[i];
    ll tmp = 0;
    ll sum = 0;

    for(int i = 0; i < N - 1; i++){
        ll d = (X[i + 1] - X[i]) % mod;
        (tmp += div_mod((i + 1), mod)) %= mod;
        (sum += d * tmp) %= mod;
    }
    for(ll i = 0; i < N - 1; i++){
        (sum *= (i + 1)) %= mod;
    }

    cout << sum << endl;


    return 0;
}
