#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5 + 5, mod = 998244353;
long long n, m, a, b[N], cur;
long long binpow(long long aa, long long mm) {
  long long ret = 1;
  for (; mm; mm >>= 1, aa = (aa * aa) % mod)
    if (mm & 1) ret = (ret * aa) % mod;
  return ret;
}
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];
  cur = binpow(a, n);
  for (long long i = 1; i <= m; ++i) {
    long long tmp = binpow(a, b[i] - b[i - 1]);
    cur *= ((binpow((2 * tmp) % mod, mod - 2) * (tmp - 1)) % mod +
            binpow(tmp, mod - 2)) %
           mod;
    cur %= mod;
  }
  cout << (cur + mod) % mod;
  return 0;
}
