n,k = map(int,input().split()) a = list(map(int,input().split())) check = pow(2,k,998244353) print((sum(a)*check)%998244353)