#include <bits/stdc++.h>
using namespace std;
const int MOD = 998244353;
const int INF = 1e9;
const int N = 2e5 + 5;
long long qpow(long long a, long long b) {
  long long ret = 1;
  while (b) {
    if (b & 1) ret = ret * a % MOD;
    a = a * a % MOD;
    b >>= 1;
  }
  return ret;
}
inline void up(int& a, int b) {
  a += b;
  if (a >= MOD) a -= MOD;
  if (a < 0) a += MOD;
}
inline int rd() {
  int x = 0;
  char c = getchar();
  while (!isdigit(c)) c = getchar();
  while (isdigit(c)) x = x * 10 + c - '0', c = getchar();
  return x;
}
int b[N];
int main() {
  int n, m, A;
  scanf("%d%d%d", &n, &m, &A);
  long long ans = 1;
  for (int i = 1; i <= m; i++) {
    scanf("%d", &b[i]);
    long long t = qpow(A, b[i] - b[i - 1]);
    ans = (t + 1) * t / 2 % MOD * ans % MOD;
  }
  ans = ans * qpow(A, n - b[m] * 2) % MOD;
  cout << ans;
  return 0;
}
