#include <bits/stdc++.h>
using namespace std;
const long long MOD = 998244353;
long long summod(long long a, long long b) { return (a + b) % MOD; }
long long mulmod(long long a, long long b) { return (a * b) % MOD; }
long long binpow(long long a, long long n) {
  long long res = 1;
  for (; n > 0; n >>= 1) {
    if (n & 1LL) res = mulmod(res, a);
    a = mulmod(a, a);
  }
  return res;
}
long long inverse(long long a) { return binpow(a, MOD - 2); }
void solve() {
  int n, m, a;
  cin >> n >> m >> a;
  vector<int> b(m);
  for (auto &x : b) cin >> x;
  long long res = binpow(a, n - 2 * b[m - 1]);
  int prevk = 0;
  for (auto k : b) {
    int x = k - prevk;
    res = mulmod(res, summod(binpow(a, x), binpow(a, 2 * x)));
    prevk = k;
  }
  res = mulmod(res, inverse(binpow(2, m)));
  cout << res;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  solve();
}
