#include <bits/stdc++.h>
using namespace std;
long long ModExp(int a, int n) {
  long long x = a, y = 1 % 998244353;
  while (n) {
    if (n % 2) {
      y = (y * x) % 998244353;
    }
    x = (x * x) % 998244353;
    n /= 2;
  }
  return y;
}
long long ModInv(int a) { return ModExp(a, 998244353 - 2); }
int main() {
  int n, m, a, bx;
  scanf("%d%d%d", &n, &m, &a);
  long long ans = 1;
  for (int i = 1, by = 0; i <= m; ++i, bx = by) {
    scanf("%d", &by);
    long long x = ModExp(a, by - bx);
    x = (x * (x + 1)) % 998244353;
    ans = (ans * x) % 998244353;
  }
  ans = (ans * ModExp(a, n - 2 * bx)) % 998244353;
  ans = (ans * ModExp(ModInv(2), m)) % 998244353;
  printf("%lld\n", ans);
  return 0;
}
