#include <bits/stdc++.h>
using namespace std;
long long n, m, A, Mod = 998244353, w[222222];
long long Pow(long long a, long long b) {
  long long r = 1;
  while (b) {
    if (b & 1) r = r * a % Mod;
    a = a * a % Mod;
    b >>= 1;
  }
  return r;
}
int main() {
  int i;
  scanf("%lld%lld%lld", &n, &m, &A);
  for (i = 1; i <= m; i++) {
    scanf("%lld", &w[i]);
  }
  long long res = 1;
  for (i = 1; i <= m; i++) {
    res = res * (Pow(A, w[i] - w[i - 1]) + Pow(A * A % Mod, w[i] - w[i - 1])) %
          Mod;
  }
  res = res * Pow(A, n - w[m] * 2) % Mod;
  res = res * Pow(Pow(2, m), Mod - 2) % Mod;
  printf("%lld\n", res);
}
