#include <bits/stdc++.h>
const int mo = 998244353;
int ksm(int a, int k) {
  int ret = 1;
  while (k) {
    if ((k & 1)) ret = ret * 1ll * a % mo;
    a = a * 1ll * a % mo;
    k >>= 1;
  }
  return ret;
}
int n, m, A, b[200050];
int main() {
  scanf("%d%d%d", &n, &m, &A);
  int inv = ksm(2, mo - 2);
  int ans = 1;
  for (int i = 1; i <= m; i++) {
    scanf("%d", &b[i]);
    int tmp = ksm(A, b[i] - b[i - 1]);
    ans = ans * 1ll * tmp % mo * (tmp + 1) % mo * inv % mo;
  }
  ans = ans * 1ll * ksm(A, n - b[m] - b[m]) % mo;
  printf("%d\n", ans);
}
