#include "bits/stdc++.h"
using namespace std;
using ll = long long;
#define all(x) (x).begin(),(x).end()
ll power(ll x , ll n,ll mod){
    if(n == 0) return 1ll;
    ll cur = power(x, n >> 1,mod);
    if(n & 1) return (cur % mod * cur % mod  * x) % mod ;
    return (cur % mod * cur % mod) % mod ;
}
const int maxx = 200005;
const int mod = 1000000007;
ll a[maxx];
void solve()
{
    ll n , m ; cin >> n >> m;
    if(m == 0){
        cout << 1;
        return ;
    }
    for(ll i = 1; i <= m ; ++i) cin >> a[i];
    sort(a + 1,a + 1 + m);
    ll ans = ((a[1] - 1) == 0  ? 1e9 : a[1] - 1);
    for(ll i = 2; i <= m ; ++i){
        if(a[i] - a[i - 1] - 1 != 0)ans = min(ans , a[i] - a[i - 1] - 1);
    }
    if(n - a[m] != 0) ans = min(ans,n - a[m]);
    if(n == m){
        cout << 0;
        return ;
    }
    //cout << ans << '\n';
    ll res = ( (a[1] - 1ll) % ans == 0 ? (a[1] - 1ll) / ans : (a[1] - 1ll) / ans + 1);
    for(ll i = 2; i <= m ; ++i){
        ll cur = (a[i] - a[i - 1] - 1ll) / ans;
        res += ( (a[i] - a[i - 1] - 1ll) % ans == 0 ? cur : cur + 1);
    }
    res += ( (n - a[m]) % ans == 0 ? (n - a[m]) / ans : (n - a[m]) / ans + 1);
    cout << res;
}
signed main()
{

    //freopen("t.inp","r",stdin);freopen("t.out","w",stdout);
    ios_base::sync_with_stdio(false);cin.tie(nullptr);
    solve();
    return 0;
}

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

#define ll long long
#define fw(p) for(int w=0;w<(p);w++)
#define fx(p) for(int x=0;x<(p);x++)
#define fy(p) for(int y=0;y<(p);y++)
#define fz(p) for(int z=0;z<(p);z++)
#define fyg(p,g) for(int y=(g);y<(p);y++)
#define fzg(p,g) for(int z=(g);z<(p);z++)
#define ce(d) cout<<d<<endl;
#define vecp(p) int aa;cin>>aa;(p).push_back(aa);
#define vecpl(p) long long aa;cin>>aa;(p).push_back(aa);
#define vecps(p) string aa;cin>>aa;(p).push_back(aa);
#define vecp2(p) cin>>aa;(p).push_back(aa);
#define vecpl2(p) long long a	b;cin>>ab;(p).push_back(ab);
#define vecps2(p) string ab;cin>>ab;(p).push_back(ab);
#define sorts(c) sort((c).begin(),(c).end());
#define reverses(c) reverse((c).begin(),(c).end());
#define vec(b) vector<int> (b);
#define vecl(b) vector<long long> (b);
#define vecs(b) vector<string> (b);
#define pb(b,a) (b).push_back((a));
#define doublece(a,b) cout<<(a)<<' '<<(b)<<endl;
#define pairs(s) vector<pair<int,int>> (s);
#define pairsp(s) int aa,bb;cin>>aa>>bb;(s).push_back(make_pair(aa,bb));
#define MOD 1000000007
#define cey ce("Yes")
#define cen ce("No")
#define ceY ce("YES")
#define ceN ce("NO")

int main()
{

	int N, M;
	cin >> N >> M;
	vec(A);
	pb(A, 0);
	pb(A, N + 1);
	fx(M) {
		vecp(A);
	}

	sorts(A);

	int k = INT_MAX;
	fx(A.size()-1) {
		if (A[x + 1] - A[x] - 1==0) {
			continue;
		}
		k = min(k, max(A[x + 1] - A[x]-1,1));
	}
	int ans = 0;
	fx(A.size()-1) {
		ans += (A[x + 1] - A[x] + k - 2) / k;
	}
	ce(ans)
    return 0;
}

