#include <bits/stdc++.h>
using namespace std;
const int maxN = 2e5 + 20;
const long long mod = 998244353;
long long n, m, A, b[maxN], ans = 0;
int Pow(long long a, long long b) {
  long long res = 1;
  while (b > 0) {
    if (b & 1 == 1) res = (res * a) % mod;
    a = (a * a) % mod;
    b /= 2;
  }
  return res;
}
int cnt(long long x) {
  long long base = Pow(A, x);
  return ((((base * base) % mod + base) % mod) * (mod + 1) / 2) % mod;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m >> A;
  for (int i = 1; i <= m; ++i) cin >> b[i];
  ans = Pow(A, n - b[m] * 2);
  ans = (ans * cnt(b[1])) % mod;
  for (int i = 1; i < m; ++i) ans = (ans * (cnt(b[i + 1] - b[i]))) % mod;
  cout << (ans + mod) % mod;
}
