N,K=map(int,input().split()) A=[int(i) for i in input().split()] mod=998244353 ans=sum(A)*pow(2,K,mod) ans%=mod print(ans)