#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef vector<double> vd;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef pair<int, int> P;

#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()

void YN(bool flg){if(flg) cout << "YES" << endl; else cout << "NO" << endl;}
void Yn(bool flg){if(flg) cout << "Yes" << endl; else cout << "No" << endl;}
void yn(bool flg){if(flg) cout << "yes" << endl; else cout << "no" << endl;}

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

const int INF = 1001001001;

int main()
{   
    int n, m;
    cin >> n >> m;
    vb masu(n);
    rep(i, m) {
        int a;
        cin >> a;
        --a;
        masu[a] = true;
    }

    int x = INF;
    int t = 0;
    vi v;
    rep(i, n) {
        if(masu[i] == false) t++;
        else if(t > 0) {
            x = min(x, t);
            v.push_back(t);
            t = 0;
        }
    }
    v.push_back(t);

    int ans = 0;
    for(int i : v) {
        //cout << i << endl;
        if(i%x==0) ans += (i/x);
        else ans += (i/x)+1;
    }

    cout << ans << endl;



    return 0;
}

#include <bits/stdc++.h>
using namespace std;

int main() {
    int64_t n, m, k = 0, ans = 0;
    cin >> n >> m;
    vector<int64_t> a(m);
    map<int64_t, int> s;
    for (auto i = 0; i < m; i++) cin >> a[i], a[i];
    sort(a.begin(), a.end());
    if (m == n) {
        cout << 0 << endl;
        return 0;
    }
    if (m == 0) {
        cout << 1 << endl;
        return 0;
    }
    for (auto i = 0; i < m - 1; i++)
        s[a[i + 1] - a[i] - 1]++;
    if (a.front() != 1) s[a.front() - 1]++;
    if (a.back() != n) s[n - a.back()]++;
    for (auto& elm : s) {
        if (elm.first == 0) continue;
        if (k == 0) k = elm.first, ans += elm.second;
        else
            ans += (elm.first / k +
                    ((elm.first % k) ? 1 : 0)) *
                   elm.second;
    }
    cout << ans << endl;
    return 0;
}