#include <bits/stdc++.h>
 
using namespace std;
typedef long long ll;
typedef vector<int> VI;
typedef vector<long long> Vll;
ll mm=1000000000;ll MM=mm+7;
#define rep(i, n) for(int i=0;i<n;i++)
#define PI 3.141592653589793
 

int main(){
   ll n,m;
   cin >> n >>m;
   Vll a(m);
   rep(i,m)cin >> a[i];
   sort(a.begin(),a.end());
   if(m==0){
       cout << 1 << endl;
   }
   else if(n==m)cout << 0 << endl;
   else{
       ll stmp=MM;
       Vll d;
       if((a[0]-1)!=0){
           stmp=min(stmp,a[0]-1);
            d.push_back(a[0]-1);
       }

       for(int i=1;i<m;i++){
           if((a[i]-a[i-1]-1)!=0){
               stmp=min(stmp,(a[i]-a[i-1]-1));
               d.push_back(a[i]-a[i-1]-1);
           }
       }
       if(n-a[m-1]!=0){
           stmp=min(stmp,n-a[m-1]);
           d.push_back(n-a[m-1]);
       }
    ll num=d.size();
    ll ans=0;
    rep(i,num){
        if(d[i]%stmp==0){
            ans+=d[i]/stmp;
        }
        else{
            ans+=(d[i]/stmp)+1;
        }

    }
    cout << ans << endl;
   }
       
}


#include <bits/stdc++.h>
//#pragma GCC optimize("O2")
using namespace std;
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
using namespace __gnu_pbds; 
#define F first
#define S second
#define migmig ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define ll long long 
#define ld long double
#define pii pair <long long ,long long >
#define bug(x)  cerr<<"passed "<<x<<"\n";
#define debug(x) cerr<<"---> "<<x<<"\n" ; 
#define kill(x) cout<<x<<"\n" ; return 0 ; 
#define ppi pair <pair <int, long long > , long long > 
#define ashar(x , y , z) cout<<setprecision(x)<<fixed<<y ; if (z==1) cout<<"\n" ;
#define ordered_set tree<long long , null_type,less<long long , rb_tree_tag,tree_order_statistics_node_update> 
long long const inf = 3e18, linf = 2e9, mod = 1e9+7 , inf2 = 1e12;
long long const mxn =4e5+10 ; 
ll poww(ll a, ll b, ll md) {
    return (!b ? 1 : (b & 1 ? a * poww(a * a % md, b / 2, md) % md : poww(a * a % md, b / 2, md) % md));
}


int main(){
	long long n , m ; 
	cin>>n>>m ; 
	if (m==0){
		cout<<1 ; 
		return 0 ; 
	}
	vector <int > vec ; 
	for (int i = 1 ; i <= m ; i++){
		int a ; 
		cin>>a ; 
		vec.push_back(a) ; 
	}
	vec.push_back(n+1) ; 
	sort(vec.begin(), vec.end()) ; 
	int p = 0 ;
	int kk = linf; 
	vector <int > vec2 ; 
	for (auto u : vec){
		if(u-p-1!=0)
			kk=min(kk , u-p-1) ; 
		vec2.push_back(u-p-1) ; 
		p = u ; 
	}
	long long ans = 0 ; 
//	cout<<vec2.size();
	for (auto u : vec2){
	///	cout<<u<<" " ; 
		ans+= u/kk + ((u%kk)!=0) ;
	}
	cout<<ans ; 
}