#include <bits/stdc++.h>
using namespace std;
const int maxn = 200009;
const int MOD = 998244353;
long long pw(long long a, long long b) {
  long long c = 1;
  while (b) {
    if (b & 1ll) c = c * a % MOD;
    a = a * a % MOD;
    b >>= 1;
  }
  return c;
}
int main() {
  ;
  ios_base::sync_with_stdio(false);
  cout.tie(0);
  cin.tie(0);
  long long n, m, A;
  cin >> n >> m >> A;
  vector<long long> b(m);
  for (int i = 0; i < m; ++i) cin >> b[i];
  long long invA = pw(A, MOD - 2);
  long long res = pw(pw(2, m), MOD - 2);
  res = res * pw(A, n) % MOD;
  int pre = 0;
  for (int i = 0; i < m; ++i) {
    res = res * (1 + pw(invA, b[i] - pre)) % MOD;
    pre = b[i];
  }
  cout << res << '\n';
  return 0;
}
