using namespace std;
#include<algorithm>
#include<iostream>
#include<string>
#include<cstdio>
#include<set>

int aa[210000];
int n,m;
int f(int x,int y)
{
	if(x%y)
	return x/y+1;
	else
	return x/y;
}
int main()
{
	cin>>n>>m;
	if(m==n)
	{
		cout<<0<<endl;
		return 0;
	}
	if(m==0)
	{
		cout<<1<<endl;
		return 0;
	}
	aa[0]=0;
	for(int i=1;i<=m;i++)
	{
		scanf("%d",aa+i);
	}
	sort(aa+1,aa+m+1);
	int k=n;
	if(aa[1]>1)
	k=aa[1];
    for(int i=2;i<=m;i++)
	{
		if(aa[i]-aa[i-1]>1)
		k=min(k,aa[i]-aa[i-1]);
	}
	k=k-1;
	int ans=0;
	for(int i=1;i<=m;i++)
	{
	   int temp=aa[i]-aa[i-1];
	   ans+=f(temp-1,k);
	}
	ans+=f(n-aa[m],k);
	cout<<ans<<endl;
	return 0;
}
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> 
using namespace std;
#define ll long long
#define T() long long t;cin>>t;for(long long o=1;o<=t;o++)
#define INF INT_MAX
#define INFS INT_MIN
#define mod 1000000007
#define FOR(a, b, n) for(int a = b; a < n; a++)
#define REP(a,c, b) for(int a = c; a < b; a++)
#define FORD(a, b, c) for(int a = b; a >= c; a--)
#define REPR(a, c,b) for(int a = b-1; a >= c; a--)
#define IOS  ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define RESET(a, b) memset(a, b, sizeof a)
#define EPS 1e-9
#define m_p make_pair
#define pb push_back
#define ppb pop_back
#define fi first
#define se second
#define  rall(x) x.rbegin(), x.rend()
#define all(x) x.begin(), x.end()
#define ALL(x, y) x, x+y
#define SZ(x) ((int)x.size())
#define  pi(a)  pair<a, a> 
#define  vi(a)  vector<a> 
#define  vii(a) vector<pi(a)>
#define  vs vector<string>
template<class T> T sqr(T x){ return x*x; }
template<class T> T binPow(T p, int q, int MOD) {
    if(q == 1) return p % MOD;
    if(q & 1) return p*(binPow(p, q-1, MOD) % MOD) % MOD;
    else return sqr(binPow(p, q/2, MOD) % MOD) % MOD;
}
#define TRACE
#ifdef TRACE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
	cout << name << " : " << arg1 << endl;
	//use cerr if u want to display at the bottom
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
	const char* comma = strchr(names + 1, ','); cout.write(names, comma - names) << " : " << arg1 << " | "; __f(comma + 1, args...);
}
#else
#define trace(...)
#endif
 
ll nxt() {
    ll temporaryVariable;
    cin >> temporaryVariable;
    return temporaryVariable;
}
const double PI = acos(-1.0);
#define MAXN 100001
const int G = 2e5 + 5;
 
 int N=10000000;
 
 
int main(){
    IOS
 
     ll n,m,cnt=0;;cin>>n>>m;
     vi(int) a(m),v;
      REP(i,0,m)
      cin>>a[i];
     
     if(n==m){
         cout<<0<<endl;
         return 0;
     }
     
     if(m==0){
         cout<<1<<endl;
         return  0;
     }
     sort(all(a));
  
      if(a[0]-1>0)
      v.pb(a[0]-1);
      
      if(n-a[m-1]>0)
      v.pb(n-a[m-1]);
      
      REP(i,1,m){
          int p=a[i]-a[i-1]-1;
          if(p>0)
          v.pb(p);
      }
      sort(all(v));
      
      int k=v[0];
      REP(i,0,SZ(v)){
          cnt+=v[i]/k;
          if(v[i]%k!=0)cnt++;
      }
      
      cout<<cnt<<endl;
    
   
    #ifdef HOHderr, "%.3lf\n", clock() / (double) CLOCKS_PER_SEC );
#endif 
}