#include <bits/stdc++.h>
using namespace std;
const int mod = 998244353, N = 2e5 + 9;
int n, m, A, dp[N][2], b[N];
int fastpower(int b, int p) {
  if (p == 0) return 1;
  int ans = fastpower(1LL * b * b % mod, p / 2);
  if (p % 2) ans = 1LL * ans * b % mod;
  return ans;
}
int solve(int i, int j) {
  if (i == m - 1) {
    if (j) return (fastpower(A, b[i]) + 1) % mod;
    return (fastpower(fastpower(A, b[i]), mod - 2) + 1) % mod;
  }
  int &ans = dp[i][j];
  if (ans != -1) return ans;
  ans = solve(i + 1, j);
  if (j)
    ans = (1LL * fastpower(A, b[i]) * solve(i + 1, 0) + ans) % mod;
  else
    ans =
        (1LL * fastpower(fastpower(A, b[i]), mod - 2) * solve(i + 1, 1) + ans) %
        mod;
  return ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m >> A;
  for (int i = 0; i < m; i++) cin >> b[i];
  reverse(b, b + m);
  memset(dp, -1, sizeof dp);
  long long sum = 1LL * fastpower(A, n) * solve(0, 0) % mod;
  cout << sum * fastpower(fastpower(2, m), mod - 2) % mod;
}
