#include <bits/stdc++.h>
using namespace std;
using li = long long;
using ld = long double;
void solve(bool);
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout << fixed << setprecision(20);
  solve(true);
  return 0;
}
const int mod = 998244353;
li pw(li x, li y) {
  if (y == 0) return 1;
  if (y & 1) return pw(x, y - 1) * x % mod;
  return pw(x * x % mod, y / 2);
}
li n, m, A;
void solve(bool __attribute__((unused)) read) {
  cin >> n >> m >> A;
  vector<int> b;
  b.push_back(0);
  for (int i = 0; i < m; ++i) {
    int x;
    cin >> x;
    b.push_back(x);
  }
  li ans = 1;
  for (int i = 0; i < (int)b.size() - 1; ++i) {
    li mult = (pw(A, 2 * (b[i + 1] - b[i])) + pw(A, (b[i + 1] - b[i]))) % mod *
              pw(2, mod - 2) % mod;
    ans = ans * mult % mod;
  }
  ans = ans * pw(A, n - 2 * b.back()) % mod;
  cout << ans << endl;
}
