/* author:ryo3ihara        ”継続は力なり、雨だれ石を穿つ”           ”slow but steady wins the race” */ #pragma GCC optimize("Ofast") #include //#include //using namespace atcoder; /* // 多倍長テンプレ #include #include namespace mp = boost::multiprecision; // 任意長整数型 using Bint = mp::cpp_int; // 仮数部が1024ビットの浮動小数点数型(TLEしたら小さくする) using Real = mp::number>; */ using namespace std; using ll = long long; using ld = long double; using pll = pair; using pli = pair; using pii = pair; using pld = pair; using ppiii = pair; using ppiill = pair; using ppllll = pair; using pplii = pair; using mii = map; using dll = deque; using qll = queue; using pqll = priority_queue; using pqrll = priority_queue, greater>; using vint = vector; using vll = vector; using vpll = vector; using vvll = vector>; using vvint = vector>; using vvpll = vector>; //マクロ //forループ #define REP(i,n) for(ll i=0;i=0;i--) #define FOR(i,a,b) for(ll i=a;i<=ll(b);i++) #define FORD(i,a,b) for(ll i=a;i>=ll(b);i--) #define ALL(x) x.begin(),x.end() #define rALL(x) x.rbegin(),x.rend() #define SIZE(x) ll(x.size()) #define fs first #define sc second //定数 const ll MOD = 998244353; const int inf = 1e9; const ll INF = 1e18; const ll MAXR = 100000; //10^5:配列の最大のrange inline void Yes(bool b = true) { cout << (b ? "Yes" : "No") << '\n'; } inline void YES(bool b = true) { cout << (b ? "YES" : "NO") << '\n'; } //最大化問題最小化問題 template inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; } template inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; } //高速冪乗化 modの時は一部入れ替える ll power(ll x, ll y) { if(y == 1) { return x; } ll ans; if(y % 2 == 1) { ll r = power(x,(y-1)/2); ans = r * r % MOD; ans = ans * x % MOD; //ans = x * r * r; } else { ll r = power(x,y/2); ans = r * r % MOD; //ans = r * r; } return ans; } /* Bint powerb(Bint x, Bint y) { if(y == 1) { return x; } Bint ans; if(y % 2 == 1) { Bint r = powerb(x,(y-1)/2); //ans = r * r % MOD; //ans = ans * x % MOD; ans = x * r * r; } else { Bint r = powerb(x,y/2); //ans = r * r % MOD; ans = r * r; } return ans; } */ //const int mod = 1000000007; const int mod = 998244353; struct mint { ll x; // typedef long long ll; mint(ll x=0):x((x%mod+mod)%mod){} mint operator-() const { return mint(-x);} mint& operator+=(const mint a) { if ((x += a.x) >= mod) x -= mod; return *this; } mint& operator-=(const mint a) { if ((x += mod-a.x) >= mod) x -= mod; return *this; } mint& operator*=(const mint a) { (x *= a.x) %= mod; return *this;} mint operator+(const mint a) const { return mint(*this) += a;} mint operator-(const mint a) const { return mint(*this) -= a;} mint operator*(const mint a) const { return mint(*this) *= a;} mint pow(ll t) const { if (!t) return 1; mint a = pow(t>>1); a *= a; if (t&1) a *= *this; return a; } // for prime mod mint inv() const { return pow(mod-2);} mint& operator/=(const mint a) { return *this *= a.inv();} mint operator/(const mint a) const { return mint(*this) /= a;} }; istream& operator>>(istream& is, mint& a) { return is >> a.x;} ostream& operator<<(ostream& os, const mint& a) { return os << a.x;} signed main(){ //入力の高速化用のコード ios::sync_with_stdio(false); cin.tie(nullptr); //入力 ll N,K; cin >> N >> K; vll A(N); mint sum = 0; REP(i,N){cin >> A[i];sum+=A[i];} if(K==0){cout << sum << endl; return 0;} mint ans = sum*power(2,K); //本文 //出力 cout << ans << endl; //本文 //出力 //cout << ans << endl; //cout << fixed << setprecision(10) << ans << endl; return 0; }