#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long double pi = acos(-1);
const int MOD = 998244353;
const long long int LINF = 0x3f3f3f3f3f3f3f3f;
int n, m, a;
long long int powe(long long int b, long long int e) {
  long long int ret = 1;
  while (e >= 1) {
    if (e % 2 == 1) ret = (ret * b) % MOD;
    b = (b * b) % MOD;
    e >>= 1;
  }
  return ret;
}
int main() {
  ios::sync_with_stdio(false);
  ;
  cin >> n >> m >> a;
  int last = 0;
  long long int ans = 1;
  long long int inv2 = powe(2, MOD - 2);
  for (int i = 0; i < m; i++) {
    int x;
    cin >> x;
    long long int aux = powe(a, (x - last));
    aux = (aux + 1) % MOD;
    aux = (aux * powe(a, (x - last))) % MOD;
    aux = (aux * inv2) % MOD;
    ans = (ans * aux) % MOD;
    last = x;
  }
  ans = (ans * (powe(a, n - 2 * last))) % MOD;
  cout << ans << "\n";
  return 0;
}
