N,K = map(int,input().split()) A = list(map(int,input().split())) P = 998244353 ans = sum(A)*pow(2,K,P)%P print(ans)