function Main(input) {
	var lines = input.split("\n");
	var x = lines[1].split(" ");
	var sum = 0
	for(var i =0 ;i < x.length - 1; i++) {
		sum += x[i + 1] / (x.length - 1)
	}
	console.log((factorial(x.length - 1) * sum) % 1000000007)
	function factorial(n) {
		if(n <= 0) return 1
		return n * factorial(n - 1)
	}
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));