#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
const long long INF = 1e18;
const long double EPS = 1e-12;
int mod = 998244353;
int b[200005];
int mul(int x, int y) {
  long long z = 1LL * x * y;
  if (z >= (long long)mod) z %= (long long)(mod);
  return z;
}
int add(int x, int y) {
  int z = x + y;
  if (z >= mod) z -= mod;
  return z;
}
int mod_pow(int x, int p) {
  if (p == 0) return 1;
  if (p == 1) return x;
  int tmp = mod_pow(x, p / 2);
  tmp = mul(tmp, tmp);
  if (p % 2) tmp = mul(tmp, x);
  return tmp;
}
int main() {
  int n, m, a;
  cin >> n >> m >> a;
  for (int i = 0; i < (int)m; i++) {
    cin >> b[i];
  }
  int ans = 1;
  int inv = mod_pow(2, mod - 2);
  for (int i = 0; i < (int)m; i++) {
    int len = b[i] - b[i - 1];
    int tans = mul(inv, add(mod_pow(a, 2 * len), mod - mod_pow(a, len)));
    tans = add(tans, mod_pow(a, len));
    ans = mul(ans, tans);
  }
  int last = b[m - 1] + 1;
  if (last <= (n + 1) / 2) {
    int dif = ((n + 1) / 2) - last;
    dif *= 2;
    if (n % 2)
      dif++;
    else
      dif += 2;
    ans = mul(ans, mod_pow(a, dif));
  }
  cout << ans << endl;
  return 0;
}
