#include <bits/stdc++.h>
const int md = 998244353;
inline int add(int a, int b) {
  a += b;
  if (a >= md) a -= md;
  return a;
}
inline int mul(int a, int b) { return (long long)a * b % md; }
int po(int a, int b) {
  int r = 1;
  while (b) {
    if (b & 1) r = mul(r, a);
    a = mul(a, a);
    b >>= 1;
  }
  return r;
}
inline int inv(int a) { return po(a, md - 2); }
inline int di(int a, int b) { return mul(a, inv(b)); }
int n, m, a;
int main() {
  scanf("%d%d%d", &n, &m, &a);
  int s = 1, s_inv = 1;
  for (int i = 0; i < m; ++i) {
    int v;
    scanf("%d", &v);
    int next_s = add(s, mul(s_inv, po(a, v))),
        next_s_inv = add(s_inv, mul(s, po(inv(a), v)));
    s = next_s;
    s_inv = next_s_inv;
  }
  printf("%d\n", di(mul(s_inv, po(a, n)), po(2, m)));
  return 0;
}
