#include <bits/stdc++.h>
using namespace std;
long long n, A;
int m;
long long f[200005][2], b[200005];
long long pw(long long x, long long y) {
  long long ans = 1;
  for (; y; y >>= 1, x = x * x % 998244353)
    if (y & 1) ans = ans * x % 998244353;
  return ans;
}
int main() {
  scanf("%lld%d%lld", &n, &m, &A);
  for (int i = 1; i <= m; i++) scanf("%lld", &b[i]);
  long long sum = 0;
  f[0][0] = pw(A, n);
  for (int i = 1; i <= m; i++) {
    f[i][0] = (f[i - 1][0] + f[i - 1][1] * pw(A, b[m - i + 1])) % 998244353;
    f[i][1] =
        (f[i - 1][1] + f[i - 1][0] * pw(A, 998244353 - 1 - b[m - i + 1])) %
        998244353;
  }
  long long inv = pw(pw(2, m), 998244353 - 2);
  printf("%lld\n", (f[m][0] + f[m][1]) * inv % 998244353);
}
