/*
#include <boost/functional/hash.hpp>
#include <boost/multiprecision/cpp_int.hpp>
typedef boost::multiprecision::cpp_int mlint;
*/
#include <bits/stdc++.h>
using namespace std;

#define debug 0
#define print(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl
#define fcout(d) cout << fixed << setprecision(d)
#define each(i,v) for(auto i = begin(v); i != end(v); ++i)
#define reach(i,v) for(auto i = rbegin(v); i != rend(v); ++i)
#define urep(i,s,t) for(int i = (int)(s); i <= (int)(t); ++i)
#define drep(i,s,t) for(int i = (int)(s); i >= (int)(t); --i)
#define rep(i,n) urep(i,0,(n) - 1)
#define rep1(i,n) urep(i,1,(n))
#define rrep(i,n) drep(i,(n) - 1,0)
#define all(v) begin(v),end(v)
#define rall(v) rbegin(v),rend(v)
#define vct vector
#define prique priority_queue
#define l_bnd lower_bound
#define u_bnd upper_bound
#define rsz resize
#define ers erase
#define emp emplace
#define emf emplace_front
#define emb emplace_back
#define pof pop_front
#define pob pop_back
#define mkp make_pair
#define mkt make_tuple
#define fir first
#define sec second

typedef long long ll;
typedef double db;
typedef vct<vct<ll>> mat;
typedef pair<int,int> pii;
typedef tuple<int,int,int> tiii;
typedef map<int,int> mpii;
typedef unordered_map<int,int> umpii;

template <class T, class U> ostream& operator << (ostream& s, pair<T,U> p) { return s << p.fir << " " << p.sec; }
template <class T> ostream& operator << (ostream& s, vct<T> v) { each(i,v) { if(i != begin(v)) s << " "; s << *i; } return s; }

auto esc = [](auto ret) { cout << ret << endl; exit(0); };
auto odd = [](auto x) { return x & 1; };
auto even = [](auto x) { return !odd(x); };
auto qceil = [](auto x, auto y) { return x > 0 ? (x - 1) / y + 1 :  x / y; };
auto parity = [](auto x, auto y) { return odd(x) ^ even(y); };
auto chmax = [](auto& m, auto x) { if(m < x) { m = x; return 1; } return 0; };
auto chmin = [](auto& m, auto x) { if(m > x) { m = x; return 1; } return 0; };
auto cmprs  = [](auto& v) {
    auto tmp = v;
    sort(all(tmp));
    tmp.erase(unique(all(tmp)),end(tmp));
    for(auto it = begin(v); it != end(v); ++it) *it = l_bnd(all(tmp),*it) - begin(tmp) + 1;
    return tmp.size() != v.size();
};

const int dir[8][2] = { {1,0},{0,1},{-1,0},{0,-1},{1,1},{-1,1},{-1,-1},{1,-1} };
const ll inf32 = (1 << 30) - 1;
const ll inf64 = (1LL << 62) - 1;
const ll mod = 1e9 + 7;
const db eps = 1e-15;

struct Mathfn {
    ll md;
    vct<ll> fact_tbl,invfact_tbl;

    Mathfn(int n, ll m = mod) {
        md = m;
        fact_init(n);
        invfact_init(n);
    }

    void fact_init(int n) {
        fact_tbl.resize(n + 1);
        fact_tbl[0] = 1;
        for(int i = 1; i <= n; i++) fact_tbl[i] = fact_tbl[i - 1] * i % md;
    }

    ll fact(int x) {
        return x >= 0 ? fact_tbl[x] : 0;
    }

    void invfact_init(int n) {
        invfact_tbl.resize(n + 1);
        invfact_tbl[n] = modinv(fact(n));
        for(int i = n; i > 0; i--) invfact_tbl[i - 1] = invfact_tbl[i] * i % md;
    }

    ll invfact(int x) {
        return x >= 0 ? invfact_tbl[x] : 0;
    }

    ll comb(int x, int y) {
        return fact(x) * invfact(y) % md * invfact(x - y) % md;
    }

    ll modpow(ll n, ll e) {
        if(e <= 0) return 1;
        if(!(n %= mod)) return 0;
        return modpow(n * n % md,e / 2) * (e & 1 ? n : 1) % md;
    }

    ll modinv(ll n) {
        return modpow(n,md - 2);
    }

    bool prm_jdg(ll n){
    	if(n == 2) return 1;
    	if(n <= 1 || ~n & 1) return 0;
    	for(ll d = 3; d * d <= n; d += 2) if(!(n % d)) return 0;
    	return 1;
    }

    auto prm_tbl(int n) {
        vct<bool> ret(n + 1,1);
      	for(int i = 2; i * 2 <= n; i++) ret[i * 2] = 0;
      	ret[0] = ret[1] = 0;
      	int p = 3;
      	while(p * p <= n) {
            for(int t = p * 3; t <= n; t += p * 2) ret[t] = 0;
            p += 2;
            while(!ret[p]) p += 2;
      	}
      	return ret;
    }

    auto prm_fac(ll n) {
        unordered_map<int,int> ret;
        int cnt = 0;
        for(ll d = 2; d * d <= n; d++) {
            while(n % d == 0) {
                cnt++;
                n /= d;
            }
            if(cnt) {
                ret[d] = cnt;
                cnt = 0;
            }
        }
        if(n > 1) ret[n] = 1;
        return ret;
    }
};

int N;
ll A[100001],F[100001];
Mathfn mf(100001);

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    cin >> N;
    rep1(i,N) cin >> A[i];
    rep(i,N) F[i] = mf.fact(i) * mf.fact(N - i - 1) % mod * mf.comb(N,i + 1) % mod;
    ll ans = 0,sum = 0;
    rep(i,N) (sum += F[i]) %= mod;
    rep1(i,N){
        ans += sum * A[i] % mod;
        ans %= mod;
        if(i < N) sum += F[i] - F[N - i];
        sum = (sum + mod) % mod;
    }
    esc(ans);
}


Measured memory_bytes: 3456