# 部分点

def main():
    from functools import reduce

    MOD = 10 ** 9 + 7

    n = int(input())
    *x, r = map(int, input().split())

    dist_to_r_edge = [r - x_ for x_ in x]

    ret = reduce(
        lambda a, b: (a + b) % MOD,
        (
            d * pow(i, MOD - 2, MOD)
            for i, d in enumerate(dist_to_r_edge, 1)
        )
    )

    f = 1
    for i in range(1, n):
        f = (f * i) % MOD

    print(ret * f % MOD)


if __name__ == '__main__':
    main()
