n,k = map(int, input().split()) A = list(map(int, input().split())) mod = 998244353 ans = sum(A)*pow(2, k, mod) ans %= mod print(ans)