#include <bits/stdc++.h>
using namespace std;
const long long p = 998244353;
long long n, m, A, ans, b[500010];
long long ksm(long long x, long long y) {
  long long xlh = 1;
  while (y) {
    if (y & 1) xlh = xlh * x % p;
    x = x * x % p;
    y /= 2;
  }
  return xlh;
}
int main() {
  long long i, x, y, xlh, len;
  ans = 1;
  scanf("%lld%lld%lld", &n, &m, &A);
  for (i = 1; i <= m; i++) {
    scanf("%lld", &b[i]);
    len = b[i] - b[i - 1];
    xlh = ksm(A, len);
    xlh = xlh * (xlh + 1) % p * ksm(2, p - 2) % p;
    ans = ans * xlh % p;
  }
  ans = ans * ksm(A, n - b[m] * 2) % p;
  printf("%lld", ans);
}
