#include <bits/stdc++.h>
using namespace std;
template <class I>
inline void ckMax(I& p, I q) {
  p = (p > q ? p : q);
}
template <class I>
inline I Min(I p, I q) {
  return p < q ? p : q;
}
template <class I>
inline I Max(I p, I q) {
  return p > q ? p : q;
}
template <class I>
inline void sp(I& p, I& q) {
  I x = p;
  p = q, q = x;
}
const int N = 1000005;
int n, m, a[N], A, ans = 1;
inline int ksm(register int x, register int L) {
  register int ans = 1;
  while (L)
    L& 1 ? ans = (0ll + ans) * x % 998244353 : 0, x = (0ll + x) * x % 998244353,
           L >>= 1;
  return ans;
}
int main() {
  scanf("%d%d%d", &n, &m, &A);
  register int i, x;
  for (i = 1; i <= m; ++i) scanf("%d", &a[i]);
  ans = ksm(A, n - a[m] - a[m]);
  for (i = 1; i <= m; ++i)
    x = ksm(A, a[i] - a[i - 1]), ans = (0ll + ans) * x % 998244353 * (x + 1ll) %
                                       998244353 * 499122177 % 998244353;
  printf("%d", ans);
  return 0;
}
