#include <bits/stdc++.h>
int b[262144];
int pow(int a, int b) {
  int res = 1;
  while (b) {
    if (b & 1) res = (long long int)res * a % 998244353;
    a = (long long int)a * a % 998244353;
    b >>= 1;
  }
  return res;
}
int main() {
  int n, m, a;
  scanf("%d%d%d", &n, &m, &a);
  for (int i = 1; i <= m; ++i) scanf("%d", b + i);
  int ans = 1;
  for (int i = 1; i <= m; ++i) {
    int x = b[i] - b[i - 1];
    ans = ans * (long long int)(pow(a, x * 2) + pow(a, x)) % 998244353 *
          499122177 % 998244353;
  }
  ans = ans * (long long int)(pow(a, n - b[m] * 2)) % 998244353;
  printf("%d\n", ans);
  return 0;
}
