#include <bits/stdc++.h>
using namespace std;
const int maxn = 202000;
const int mod = 998244353;
int n, m, A;
int a[maxn];
int fast_pow(int now, int pw) {
  int ans = 1, dt = now, bit = 1;
  while (bit <= pw) {
    if (bit & pw) ans = 1ll * ans * dt % mod;
    dt = 1ll * dt * dt % mod;
    bit <<= 1;
  }
  return ans;
}
void read() {
  scanf("%d%d%d", &n, &m, &A);
  for (int i = 1; i <= m; i++) scanf("%d", &a[i]);
}
void work() {
  int ans = 1;
  ans = fast_pow(A, n - 2 * a[m]);
  for (int i = 1; i <= m; i++) {
    int dif = a[i] - a[i - 1];
    int z = fast_pow(A, dif);
    z = 1ll * z * (1 + z) / 2 % mod;
    ans = 1ll * ans * z % mod;
  }
  printf("%d", ans);
}
int main() {
  read();
  work();
  return 0;
}
