#include "bits/stdc++.h" using namespace std;typedef long long lint;typedef vector liv; #define rep(i,n) for(int i=0;i=0;--i) #define md 1000000007 lint powmod_h; lint powmod(lint a,lint p){ if(!p)return 1; if(p&1)return powmod(a,p-1)*a%md; else{ powmod_h=powmod(a,p/2); return powmod_h*powmod_h%md; } } lint fa[100010],rfa[100010];//kaijou,gyakugen n==10^7kurai made void setfa(lint n){ fa[0]=1; repi(i,1,n)fa[i]=(fa[i-1]*i)%md; rfa[n-1]=powmod(fa[n-1],md-2); repr_(i,n-2)rfa[i]=(rfa[i+1]*(i+1))%md; } inline lint ncr(lint n,lint r){ return fa[n]*rfa[r]%md*rfa[n-r]%md; } int main(){ lint n;cin>>n; lint a,ans=0; setfa(n); rep(i,n){ cin>>a; ans+=ncr(n-1,i)*a; ans%=md; }cout<