#include #define REP(i,b,e) for(int i=b;i>= 1; } return ret; } int main(){ ll n, k; scanf("%lld %lld", &n, &k); ll sum = 0; REP(i, 0, n){ ll a; scanf("%lld", &a); sum += a; } ll ans = modpow(2, k, MOD); ans = ans * sum % MOD; printf("%lld\n", ans); return 0; }