#include <bits/stdc++.h>

using namespace std;

const int MX = 100000, md = 1000000007;

int a[MX], inv[MX + 1], s_inv[MX + 1];

int main() {
	int n;
	ignore = scanf("%d", &n);
	for (int i = 0; i < n; i++) ignore = scanf("%d", a + i);
	
	s_inv[1] = inv[1] = 1;
	for (int i = 2; i <= n; i++) {
		inv[i] = md - (md / i) * 1ll * inv[md % i] % md;
		s_inv[i] = (s_inv[i - 1] + inv[i]) % md;
	}
	
	int ans = 0;
	for (int i = 0; i < n; i++) {
		ans = (ans + (s_inv[i + 1] + s_inv[n - i] - 1ll) * a[i]) % md;
	}
	
	for (int i = 1; i <= n; i++) ans = ans * 1ll * i % md;
	
	printf("%d\n", ans);
	
	return 0;
}
