#include <bits/stdc++.h>
using namespace std;
using llint = long long;
const int MAXPOT = 22;
const int MAXN = 1 << MAXPOT;
int revbit[MAXN];
int w[MAXN];
void precompute_revbit() {
  const int n = 1 << MAXPOT;
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < MAXPOT; ++j)
      if ((i >> j) & 1) revbit[i] |= (1 << (MAXPOT - j - 1));
}
llint modpow(llint b, llint p, const int& mod) {
  if (p == 0) return 1;
  if (p % 2 == 0) {
    llint tmp = modpow(b, p / 2, mod);
    return tmp * tmp % mod;
  }
  return b * modpow(b, p - 1, mod) % mod;
}
vector<llint> fft(const vector<llint>& a, const int& pot, const llint& e,
                  const int& mod) {
  assert(pot < MAXPOT);
  const int n = 1 << pot;
  vector<llint> roots(n, 1);
  for (int i = 1; i < n; ++i) roots[i] = roots[i - 1] * e % mod;
  vector<llint> b(n);
  for (int i = 0; i < n / 2; ++i) {
    int curr = (revbit[i] >> (MAXPOT - pot)) & ((1 << pot) - 1);
    b[i] = a[curr];
    curr = ~curr & ((1 << pot) - 1);
    b[n - i - 1] = a[curr];
  }
  for (int i = 1; i <= pot; ++i) {
    const int sz = (1 << i);
    const int skok = 1 << (pot - i);
    for (int k = 0; k < n; k += sz) {
      for (int j = 0; j < sz / 2; ++j) {
        const llint l = b[k + j], r = b[k + j + sz / 2] * roots[j * skok];
        b[k + j] = (l + r) % mod;
        b[k + j + sz / 2] = (l - r) % mod;
      }
    }
  }
  return b;
}
vector<llint> mult(vector<llint> a, vector<llint> b, const int& mod,
                   const int& root) {
  int s = a.size() + b.size() - 1;
  int pot = 32 - __builtin_clz(s - 1);
  int N = 1 << pot;
  int w = modpow(root, (mod - 1) / N, mod);
  a.resize(N);
  a = fft(a, pot, w, mod);
  b.resize(N);
  b = fft(b, pot, w, mod);
  vector<llint> c(N);
  llint inv_n = modpow(N, mod - 2, mod);
  for (int i = 0; i < N; ++i) c[i] = a[i] * b[i] % mod * inv_n % mod;
  c = fft(c, pot, modpow(w, mod - 2, mod), mod);
  c.resize(s);
  return c;
}
const int MOD = 998244353, ROOT = 3;
int n, k, x;
int main() {
  precompute_revbit();
  scanf("%d%d", &n, &k);
  vector<llint> a(10, 0);
  for (int i = 0; i < k; ++i) {
    scanf("%d", &x);
    a[x] = 1;
  }
  vector<llint> res(1);
  res[0] = 1;
  int p = n / 2;
  while (p) {
    if (p & 1) res = mult(res, a, MOD, ROOT);
    p /= 2;
    if (p > 0) a = mult(a, a, MOD, ROOT);
  }
  llint sol = 0;
  for (llint i : res) {
    sol = (sol + i * i) % MOD;
  }
  printf("%lld\n", sol);
  return 0;
}

### Prompt

Your challenge is to write a cpp solution to the following 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.

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
using llint = long long;
const int MAXPOT = 22;
const int MAXN = 1 << MAXPOT;
int revbit[MAXN];
int w[MAXN];
void precompute_revbit() {
  const int n = 1 << MAXPOT;
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < MAXPOT; ++j)
      if ((i >> j) & 1) revbit[i] |= (1 << (MAXPOT - j - 1));
}
llint modpow(llint b, llint p, const int& mod) {
  if (p == 0) return 1;
  if (p % 2 == 0) {
    llint tmp = modpow(b, p / 2, mod);
    return tmp * tmp % mod;
  }
  return b * modpow(b, p - 1, mod) % mod;
}
vector<llint> fft(const vector<llint>& a, const int& pot, const llint& e,
                  const int& mod) {
  assert(pot < MAXPOT);
  const int n = 1 << pot;
  vector<llint> roots(n, 1);
  for (int i = 1; i < n; ++i) roots[i] = roots[i - 1] * e % mod;
  vector<llint> b(n);
  for (int i = 0; i < n / 2; ++i) {
    int curr = (revbit[i] >> (MAXPOT - pot)) & ((1 << pot) - 1);
    b[i] = a[curr];
    curr = ~curr & ((1 << pot) - 1);
    b[n - i - 1] = a[curr];
  }
  for (int i = 1; i <= pot; ++i) {
    const int sz = (1 << i);
    const int skok = 1 << (pot - i);
    for (int k = 0; k < n; k += sz) {
      for (int j = 0; j < sz / 2; ++j) {
        const llint l = b[k + j], r = b[k + j + sz / 2] * roots[j * skok];
        b[k + j] = (l + r) % mod;
        b[k + j + sz / 2] = (l - r) % mod;
      }
    }
  }
  return b;
}
vector<llint> mult(vector<llint> a, vector<llint> b, const int& mod,
                   const int& root) {
  int s = a.size() + b.size() - 1;
  int pot = 32 - __builtin_clz(s - 1);
  int N = 1 << pot;
  int w = modpow(root, (mod - 1) / N, mod);
  a.resize(N);
  a = fft(a, pot, w, mod);
  b.resize(N);
  b = fft(b, pot, w, mod);
  vector<llint> c(N);
  llint inv_n = modpow(N, mod - 2, mod);
  for (int i = 0; i < N; ++i) c[i] = a[i] * b[i] % mod * inv_n % mod;
  c = fft(c, pot, modpow(w, mod - 2, mod), mod);
  c.resize(s);
  return c;
}
const int MOD = 998244353, ROOT = 3;
int n, k, x;
int main() {
  precompute_revbit();
  scanf("%d%d", &n, &k);
  vector<llint> a(10, 0);
  for (int i = 0; i < k; ++i) {
    scanf("%d", &x);
    a[x] = 1;
  }
  vector<llint> res(1);
  res[0] = 1;
  int p = n / 2;
  while (p) {
    if (p & 1) res = mult(res, a, MOD, ROOT);
    p /= 2;
    if (p > 0) a = mult(a, a, MOD, ROOT);
  }
  llint sol = 0;
  for (llint i : res) {
    sol = (sol + i * i) % MOD;
  }
  printf("%lld\n", sol);
  return 0;
}

```