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