use std::io::prelude::*; fn input(stdin: &mut R) -> String { let mut input = String::new(); stdin.read_line(&mut input).ok(); input } macro_rules! read { ($stdin:expr, [$t:tt; $n:expr]) => { (0..$n).map(|_| read!($stdin, $t)).collect::>() }; ($stdin:expr, [$t:tt]) => { input($stdin).split_whitespace().map(|s| parse!(s, $t)).collect::>() }; ($stdin:expr, ($($t:tt),*)) => {{ let input = input($stdin); let mut iter = input.split_whitespace(); ($(parse!(iter.next().unwrap(), $t)),*) }}; ($stdin:expr, $t:tt) => { parse!(input($stdin).trim(), $t) }; } macro_rules! parse { ($s:expr, Chars) => ($s.chars().collect::>()); ($s:expr, Usize1) => (parse!($s, usize) - 1); ($s:expr, $t:ty) => ($s.parse::<$t>().unwrap()); } const MOD: i64 = 998_244_353; fn solve(stdin: &mut R, writer: &mut W) { let (_n, k) = read!(stdin, (i64, i64)); let a = read!(stdin, [i64]); let pow = |mut a: i64, mut n: i64| -> i64 { let mut res = 1; while n > 0 { if n & 1 > 0 { res = res * a % MOD; } a = a * a % MOD; n >>= 1; } res }; let sum_a = a.iter().fold(0, |acc, x| (acc + x) % MOD); let ans = sum_a * pow(2, k) % MOD; writeln!(writer, "{}", ans).ok(); } fn main() { let stdin = std::io::stdin(); let stdin = &mut stdin.lock(); let stdout = std::io::stdout(); let writer = &mut std::io::BufWriter::new(stdout.lock()); solve(stdin, writer); }