#include <bits/stdc++.h>
using namespace std;
const int MOD = 998244353, MAXn = 2e5 + 2;
long long arr[MAXn];
long long qp(long long a, long long e) {
  if (e == 0) return 1;
  if (e == 1) return a;
  if (!(e & 1)) {
    a = qp(a, e / 2);
    return a * a % MOD;
  }
  return a * qp(a, e - 1) % MOD;
}
long long r[MAXn];
long long p[MAXn];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, m, A;
  cin >> n >> m >> A;
  r[0] = p[0] = 1;
  for (int i = 1; i <= m; i++) {
    long long b;
    cin >> b;
    p[i] = (p[i - 1] + (r[i - 1] * qp(qp(A, b), MOD - 2) % MOD)) % MOD;
    r[i] = (r[i - 1] + (p[i - 1] * qp(A, b) % MOD)) % MOD;
  }
  cout << (p[m] * qp(A, n) % MOD * qp(qp(2, m), MOD - 2) % MOD);
  return 0;
}
