#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
long long poww(long long a, long long b) {
  long long res = 1;
  for (; b; a = a * a % 998244353, b >>= 1)
    if (b & 1) res = res * a % 998244353;
  return res;
}
long long f[N];
int main() {
  long long n, m, A;
  cin >> n >> m >> A;
  for (int i = 1; i <= m; i++) cin >> f[i];
  long long res = 1;
  long long inv2 = poww(2LL, 998244353 - 2);
  for (int i = 1; i <= m; i++) {
    long long tem = poww(A, f[i] - f[i - 1]);
    res = res * tem % 998244353 * (tem + 1) % 998244353 * inv2 % 998244353;
  }
  res = res * poww(A, n - f[m] - f[m]) % 998244353;
  cout << res << endl;
}
