from collections import * from itertools import * from functools import * from heapq import * import sys,math N,K = map(int,input().split()) A = list(map(int,input().split())) mod = 998244353 S = sum(A) ans = S*(pow(2,K,mod) - 1)%mod print((ans+S)%mod)