#include <bits/stdc++.h>

#define INF 0x3f3f3f3f
#define ll long long
using namespace std;
const int mod = 998244353;
const int maxn = 2e5 + 30;
const int maxm = 5e3 + 7;
ll frac[maxn], inv[maxn];
ll dp[maxm][maxm], inp[maxm][maxm];


ll power(ll a, ll b, ll m = mod){
    ll ans = 1ll;
    while (b){
        if (b & 1) ans = ans * a % m;
        a = a * a % m;
        b >>= 1;
    }
    return ans;
}

void init(){
    frac[0] = 1;
    for (int i=1; i<maxn; i++){
        frac[i] = frac[i-1] * i;
        frac[i] %= mod;
    }
    inp[0][0] = inp[1][0] = inp[1][1] = 1;
    for (int i=2; i<maxm; i++){
        inp[i][0] = 1;
        for (int j=1; j<=i; j++)
            inp[i][j] = (inp[i-1][j] + inp[i-1][j-1]) % mod;
    }
}

ll C(ll n, ll m){
//    cout << frac[n] << " " << power(frac[m], mod-2) << " " << power(frac[n-m], mod-2) << endl;
//    return frac[n] % mod * power(frac[m], mod-2) % mod * power(frac[n-m], mod-2) % mod;
        return inp[n][m];
}

int main(){
    init();
    ll n, m; scanf("%lld%lld", &n, &m);
    ll l = log2(m);
    for (int i=0; i<=m; i+=2) dp[0][i] = C(n, i);
    for (int i=1; i<=l; i++) dp[i][0] = 1;
    for (int i=1; i<=l; i++){
        for (int j=1; j<=m; j++){
            for (int k=0; (1<<i) * k <= j; k += 2){
//                cout << "????" << endl;
                dp[i][j] = (dp[i][j] + (dp[i-1][j - (1<<i) * k] * C(n, k)) % mod) % mod;
                dp[i][j] %= mod;
            }
        }
    }
    printf("%lld\n", dp[l][m]);
    return 0;
}



#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
const int INF = 1001001001;
using ll = long long;

int main(){
    int N,M;
    cin >> N >> M;
    vector<int> A(M);
    rep(i,M){
        cin >> A.at(i);
    }
    if(M==0){
        cout << 1 << endl;;
        return 0;
    }
    sort(A.begin(), A.end());
    priority_queue<int> pq;
    set<int> S;
    S.insert(A[0]-1);
    pq.push(A[0]-1);
    rep2(i,1,M){
        pq.push(A[i]-A[i-1]-1);
        S.insert(A[i]-A[i-1]-1);
    }
    pq.push(N-A[M-1]);
    S.insert(N-A[M-1]);
    S.erase(0);
    if(S.size()==0){
        cout << 0 << endl;
        return 0;
    }
    int div=0;
    div = *begin(S);
    int ans = 0;
    while(!pq.empty()){
        if(pq.top()%div==0){
            ans += pq.top()/div;
        }
        else{
            ans += (pq.top()/div+1);
        }
        pq.pop();
    }
    cout << ans << endl;
    return 0;
}