#include <bits/stdc++.h>
using namespace std;
const long long N = 200111;
const long long MOD = 998244353;
long long n, m, A;
long long b[N];
long long add(long long a, long long b) {
  a += b;
  a %= MOD;
  while (a < 0) {
    a += MOD;
  }
  return a;
}
long long mul(long long a, long long b) {
  a = a * 1ll * b;
  a %= MOD;
  while (a < 0) {
    a += MOD;
  }
  return a;
}
long long binpow(long long a, long long b) {
  long long res = 1;
  while (b > 0) {
    if (b % 2 == 1) {
      res = mul(res, a);
    }
    a = mul(a, a);
    b /= 2;
  }
  return res;
}
long long cnt(long long key) {
  long long base = binpow(A, key);
  return mul(add(mul(base, base), base), (MOD + 1) / 2);
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m >> A;
  for (long long i = 1; i <= m; i++) {
    cin >> b[i];
  }
  long long ans = binpow(A, n - b[m] * 2);
  ans = mul(ans, cnt(b[1]));
  for (long long i = 1; i <= m; i++) {
    ans = mul(ans, cnt(b[i + 1] - b[i]));
  }
  cout << ans << "\n";
  return 0;
}
