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