Problem: All bus tickets in Berland have their numbers. A number consists of n digits (n is even). Only k decimal digits d_1, d_2, ..., d_k can be used to form ticket numbers. If 0 is among these digits, then numbers may have leading zeroes. For example, if n = 4 and only digits 0 and 4 can be used, then 0000, 4004, 4440 are valid ticket numbers, and 0002, 00, 44443 are not.

A ticket is lucky if the sum of first n / 2 digits is equal to the sum of remaining n / 2 digits. 

Calculate the number of different lucky tickets in Berland. Since the answer may be big, print it modulo 998244353.

Input

The first line contains two integers n and k (2 ≤ n ≤ 2 ⋅ 10^5, 1 ≤ k ≤ 10) — the number of digits in each ticket number, and the number of different decimal digits that may be used. n is even.

The second line contains a sequence of pairwise distinct integers d_1, d_2, ..., d_k (0 ≤ d_i ≤ 9) — the digits that may be used in ticket numbers. The digits are given in arbitrary order.

Output

Print the number of lucky ticket numbers, taken modulo 998244353.

Examples

Input

4 2
1 8


Output

6


Input

20 1
6


Output

1


Input

10 5
6 1 4 0 3


Output

569725


Input

1000 7
5 4 0 1 8 3 2


Output

460571165

Note

In the first example there are 6 lucky ticket numbers: 1111, 1818, 1881, 8118, 8181 and 8888.

There is only one ticket number in the second example, it consists of 20 digits 6. This ticket number is lucky, so the answer is 1.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
function<void(void)> ____ = []() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
};
const int MAXN = 4e6 + 7;
const int MOD = 998244353;
const int FFTN = 1 << 21;
int ksm(int a, int b) {
  int ret = 1;
  while (b) {
    if (b & 1) ret = 1ll * ret * a % MOD;
    b >>= 1;
    a = 1ll * a * a % MOD;
  }
  return ret;
}
namespace FFT {
int w[FFTN + 5], W[FFTN + 5], R[FFTN + 5];
void FFTinit() {
  W[0] = 1;
  W[1] = ksm(3, (MOD - 1) / FFTN);
  for (int i = 2; i <= FFTN; i++) W[i] = 1ll * W[i - 1] * W[1] % MOD;
}
int FFTinit(int n) {
  int L = 1;
  for (; L <= n; L <<= 1)
    ;
  for (int i = 0; i <= L - 1; i++)
    R[i] = (R[i >> 1] >> 1) | ((i & 1) ? (L >> 1) : 0);
  return L;
}
int A[FFTN + 5], B[FFTN + 5];
unsigned long long int p[FFTN + 5];
void DFT(int *a, int n) {
  for (int i = 0; i < n; i++) p[R[i]] = a[i];
  for (int d = 1; d < n; d <<= 1) {
    int len = FFTN / (d << 1);
    for (int i = 0, j = 0; i < d; i++, j += len) w[i] = W[j];
    for (int i = 0; i < n; i += (d << 1))
      for (int j = 0; j < d; j++) {
        int y = p[i + j + d] * w[j] % MOD;
        p[i + j + d] = p[i + j] + MOD - y;
        p[i + j] += y;
      }
    if (d == 1 << 15)
      for (int i = 0; i < n; i++) p[i] %= MOD;
  }
  for (int i = 0; i < n; i++) a[i] = p[i] % MOD;
}
void IDFT(int *a, int n) {
  for (int i = 0; i < n; i++) p[R[i]] = a[i];
  for (int d = 1; d < n; d <<= 1) {
    int len = FFTN / (d << 1);
    for (int i = 0, j = FFTN; i < d; i++, j -= len) w[i] = W[j];
    for (int i = 0; i < n; i += (d << 1))
      for (int j = 0; j < d; j++) {
        int y = p[i + j + d] * w[j] % MOD;
        p[i + j + d] = p[i + j] + MOD - y;
        p[i + j] += y;
      }
    if (d == 1 << 15)
      for (int i = 0; i < n; i++) p[i] %= MOD;
  }
  int val = ksm(n, MOD - 2);
  for (int i = 0; i < n; i++) a[i] = p[i] * val % MOD;
}
vector<int> Norm(vector<int> a) {
  for (; a.size() && !a.back(); a.pop_back())
    ;
  return a;
}
vector<int> Plus(const vector<int> &a, const vector<int> &b) {
  int sza = a.size() - 1, szb = b.size() - 1;
  vector<int> ans(max(sza, szb) + 1);
  for (int i = 0; i <= sza; i++) ans[i] = a[i];
  for (int i = 0; i <= szb; i++) ans[i] = (ans[i] + b[i]) % MOD;
  return ans;
}
vector<int> Minus(const vector<int> &a, const vector<int> &b) {
  int sza = a.size() - 1, szb = b.size() - 1;
  vector<int> ans(max(sza, szb) + 1);
  for (int i = 0; i <= sza; i++) ans[i] = a[i];
  for (int i = 0; i <= szb; i++) ans[i] = (ans[i] + MOD - b[i]) % MOD;
  return ans;
}
vector<int> Mul(const vector<int> &a, const vector<int> &b) {
  int sza = a.size() - 1, szb = b.size() - 1;
  vector<int> ans(sza + szb + 1);
  if (sza <= 30 || szb <= 30) {
    for (int i = 0; i <= sza; i++)
      for (int j = 0; j <= szb; j++)
        ans[i + j] = (ans[i + j] + 1ll * a[i] * b[j]) % MOD;
    return ans;
  }
  int L = FFTinit(sza + szb);
  for (int i = 0; i < L; i++) A[i] = (i <= sza ? a[i] : 0);
  for (int i = 0; i < L; i++) B[i] = (i <= szb ? b[i] : 0);
  DFT(A, L);
  DFT(B, L);
  for (int i = 0; i < L; i++) A[i] = 1ll * A[i] * B[i] % MOD;
  IDFT(A, L);
  for (int i = 0; i <= sza + szb; i++) ans[i] = A[i];
  return ans;
}
void Getinv(int *a, int *b, int n) {
  if (n == 1) {
    b[0] = ksm(a[0], MOD - 2);
    return;
  }
  int nn = (n + 1) / 2;
  Getinv(a, b, nn);
  int L = FFTinit(2 * n);
  for (int i = 0; i < L; i++) A[i] = (i < n ? a[i] : 0);
  for (int i = 0; i < L; i++) B[i] = (i < nn ? b[i] : 0);
  DFT(A, L);
  DFT(B, L);
  for (int i = 0; i < L; i++)
    A[i] = 1ll * B[i] * (2 + MOD - 1ll * A[i] * B[i] % MOD) % MOD;
  IDFT(A, L);
  for (int i = 0; i < n; i++) b[i] = A[i];
}
vector<int> getinv(vector<int> a, int n) {
  int *b = new int[n];
  int *c = new int[n];
  int sz = a.size();
  for (int i = 0; i < n; i++) b[i] = (i < sz ? a[i] : 0);
  for (int i = 0; i < n; i++) c[i] = 0;
  vector<int> ans(n);
  Getinv(b, c, n);
  for (int i = 0; i < n; i++) ans[i] = c[i];
  delete[] b;
  delete[] c;
  return ans;
}
vector<int> divide(vector<int> a, vector<int> b) {
  int sza = a.size(), szb = b.size();
  if (sza < szb) return vector<int>(0);
  vector<int> b0 = b, a0 = a;
  reverse(b0.begin(), b0.end());
  reverse(a0.begin(), a0.end());
  b0 = Mul(getinv(b0, sza - szb + 1), a0);
  b0.resize(sza - szb + 1);
  reverse(b0.begin(), b0.end());
  return b0;
}
vector<int> modulo(vector<int> a, vector<int> b) {
  vector<int> ans = Minus(a, Mul(divide(a, b), b));
  ans.resize(b.size() - 1);
  return ans;
}
int Cipolla(int x) {
  int a = 1;
  for (;; ++a)
    if (ksm((1ll * a * a + MOD - x) % MOD, (MOD - 1) / 2) == MOD - 1) break;
  int w = (1ll * a * a + MOD - x) % MOD, T = (MOD + 1) / 2;
  pair<int, int> v1(1, 0), v2(a, 1);
  for (; T;) {
    if (T & 1) {
      int val1 =
          (1ll * v1.first * v2.first + 1ll * w * v1.second % MOD * v2.second) %
          MOD;
      int val2 =
          (1ll * v1.first * v2.second + 1ll * v1.second * v2.first) % MOD;
      v1 = pair<int, int>(val1, val2);
    }
    if (T /= 2) {
      int val1 =
          (1ll * v2.first * v2.first + 1ll * w * v2.second % MOD * v2.second) %
          MOD;
      int val2 =
          (1ll * v2.first * v2.second + 1ll * v2.second * v2.first) % MOD;
      v2 = pair<int, int>(val1, val2);
    }
  }
  return v1.first;
}
void Getsqrt(int *a, int *b, int n) {
  if (n == 1) {
    b[0] = Cipolla(a[0]);
    if (b[0] > MOD - b[0]) b[0] = MOD - b[0];
    return;
  }
  int nn = (n + 1) / 2;
  Getsqrt(a, b, nn);
  int *c = new int[n];
  for (int i = 0; i < n; i++) c[i] = 0;
  Getinv(b, c, n);
  int L = FFTinit(2 * n);
  for (int i = 0; i < L; i++) A[i] = (i < n ? a[i] : 0);
  for (int i = 0; i < L; i++) B[i] = (i < n ? c[i] : 0);
  DFT(A, L);
  DFT(B, L);
  for (int i = 0; i < L; i++) A[i] = 1ll * A[i] * B[i] % MOD;
  IDFT(A, L);
  for (int i = 0; i < n; i++) b[i] = 1ll * (b[i] + A[i]) * (MOD + 1) / 2 % MOD;
  delete[] c;
}
vector<int> getsqrt(vector<int> a, int n) {
  int *b = new int[n];
  int *c = new int[n];
  int sz = a.size();
  for (int i = 0; i < n; i++) b[i] = (i < sz ? a[i] : 0);
  for (int i = 0; i < n; i++) c[i] = 0;
  vector<int> ans(n);
  Getsqrt(b, c, n);
  for (int i = 0; i < n; i++) ans[i] = c[i];
  delete[] b;
  delete[] c;
  return ans;
}
vector<int> Int(vector<int> a) {
  int sza = a.size() - 1;
  vector<int> ans(sza + 2);
  ans[0] = 0;
  for (int i = 1; i <= sza + 1; i++)
    ans[i] = 1ll * a[i - 1] * ksm(i, MOD - 2) % MOD;
  return ans;
}
vector<int> Prime(vector<int> a) {
  int sza = a.size() - 1;
  vector<int> ans(sza);
  for (int i = 1; i <= sza; i++) ans[i - 1] = 1ll * a[i] * i % MOD;
  return ans;
}
vector<int> getLn(vector<int> a, int n) {
  assert(a[0] == 1);
  if (a.size() > n) a.resize(n);
  vector<int> res = Int(Mul(Prime(a), getinv(a, n)));
  res.resize(n);
  return res;
}
void Getexp(unsigned long long int *a, unsigned long long int *b, int l,
            int r) {
  if (r - l + 1 <= 64) {
    for (int i = l; i <= r; i++) b[i] %= MOD;
    for (int i = l; i <= r; i++) {
      if (i == 0)
        b[i] = 1;
      else
        b[i] = b[i] % MOD * ksm(i, MOD - 2) % MOD;
      for (int j = 1; j <= r - i; j++) b[i + j] += b[i] * a[j];
      if ((i & 15) == 15)
        for (int j = i; j <= r; j++) b[j] %= MOD;
    }
    return;
  }
  int len = (r - l + 1) / 16;
  unsigned long long int *c[16], *d[16];
  int L = FFTinit(2 * len - 1);
  int *arr = new int[L];
  for (int i = 0; i <= 15; i++) {
    d[i] = new unsigned long long int[L];
    for (int j = 0; j < L; j++) d[i][j] = 0;
  }
  for (int i = 0; i <= 14; i++) {
    c[i] = new unsigned long long int[L];
    for (int j = 0; j < L; j++) arr[j] = a[i * len + j];
    DFT(arr, L);
    for (int j = 0; j < L; j++) c[i][j] = arr[j];
  }
  for (int i = 0; i <= 15; i++) {
    if (i != 0) {
      for (int j = 0; j < L; j++) arr[j] = d[i][j] % MOD;
      IDFT(arr, L);
      for (int j = 0; j < len; j++) b[l + i * len + j] += arr[len + j];
    }
    Getexp(a, b, l + i * len, l + i * len + len - 1);
    if (i != 15) {
      L = FFTinit(2 * len - 1);
      for (int j = 0; j < L; j++) arr[j] = (j < len ? b[l + i * len + j] : 0);
      DFT(arr, L);
      for (int j = 0; j <= 14 - i; j++)
        for (int k = 0; k < L; k++) d[i + j + 1][k] += arr[k] * c[j][k];
    }
  }
  delete[] arr;
  for (int i = 0; i <= 14; i++) delete[] c[i];
  for (int i = 0; i <= 15; i++) delete[] d[i];
}
vector<int> getexp(vector<int> a, int n) {
  int m = 1, sza = a.size();
  for (; m <= n; m <<= 1)
    ;
  unsigned long long int *b = new unsigned long long int[m],
                         *c = new unsigned long long int[m];
  for (int i = 0; i < m; i++) b[i] = (i < sza ? 1ll * i * a[i] % MOD : 0);
  for (int i = 0; i < m; i++) c[i] = 0;
  Getexp(b, c, 0, m - 1);
  vector<int> ans(n);
  for (int i = 0; i < n; i++) ans[i] = c[i];
  delete[] b;
  delete[] c;
  return ans;
}
vector<int> read() {
  int n;
  scanf("%d", &n);
  vector<int> ans(n);
  for (int i = 0; i < n; i++) scanf("%d", &ans[i]);
  return ans;
}
vector<int> read(int n) {
  vector<int> ans(n);
  for (int i = 0; i < n; i++) scanf("%d", &ans[i]);
  return ans;
}
void write(const vector<int> &a) {
  for (auto i : a) printf("%d ", i);
}
void writeln(const vector<int> &a) {
  for (auto i : a) printf("%d ", i);
  puts("");
}
}  // namespace FFT
int n, k;
void solve() {
  scanf("%d %d", &n, &k);
  FFT::FFTinit();
  vector<int> A(10, 0);
  for (int i = 1; i <= k; i++) {
    int x;
    scanf("%d", &x);
    A[x] = 1;
  }
  int m = n >> 1;
  vector<int> B(1, 1);
  while (m) {
    if (m & 1) B = FFT::Mul(B, A);
    m >>= 1;
    if (m) A = FFT::Mul(A, A);
  }
  int ret = 0;
  for (int i = 0; i < B.size(); i++) ret = (ret + 1ll * B[i] * B[i]) % MOD;
  cout << ret << endl;
}
int main() {
  solve();
  return 0;
}