#include <bits/stdc++.h>
using namespace std;
const int prime = 998244353;
long long Power(long long a, int n) {
  a %= prime;
  if (n == 0) return 1;
  if (n % 2 == 0)
    return Power(a * a, n / 2);
  else
    return (Power(a * a, n / 2) * a) % prime;
}
int main() {
  cin.tie(NULL);
  ios_base::sync_with_stdio(false);
  int n, m, a;
  cin >> n >> m >> a;
  vector<int> b(m);
  for (int i = 0; i < m; i++) cin >> b[i];
  long long answer = Power(a, n - b.back());
  answer = (answer * (Power(a, b[0]) + 1)) % prime;
  for (int i = 1; i < m; i++)
    answer = (answer * (Power(a, b[i] - b[i - 1]) + 1)) % prime;
  answer = (answer * Power(2, prime - m - 1)) % prime;
  cout << answer << endl;
}
