#include <bits/stdc++.h>
#define pb push_back
#define pf push_front
#define fi first
#define se second

using namespace std;
typedef long long ll;

ll m=1000000007;
ll maxn=200050;
ll f[400050];
ll inv[200050];
ll invf[200050];


int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	ll n, k, x;
	cin >> n >> k;
	f[0]=1;
	f[1]=1;
	for(ll i=2; i<n+k+5; i++)
    {
        f[i]=f[i-1]*i;
        if(f[i]>=m)
        {
            f[i]%=m;
        }
    }
    inv[1]=1;
    invf[0]=1;
    invf[1]=1;
    for(ll i=2; i<maxn; i++)
    {
        inv[i]=-m/i*inv[m%i]%m;
        invf[i]=(invf[i-1]*inv[i])%m;
    }
	ll r=0;
	for(ll i=0; i<n; i++)
    {
        cin >> x;
        ll res=((((f[n+k-i-1]*invf[n-i-1])%m*f[k+i])%m*invf[i])%m)%m;
        res=(res*x)%m;
        res=((res*invf[k])%m*invf[k])%m;
        r=((r+res)%m+m)%m;
    }
    cout << r << "\n";
}