#include <bits/stdc++.h>
using namespace std;
const int INF = 1001001001;

int main(){
  int n, m;
  cin >> n >> m;
  int num = 0;
  int ans = 0;
  int hanko = INF;
  vector<int> an(m);
  for(int i=0; i<m; ++i) cin >> an[i];
  sort(an.begin(),an.end());
  for(int i=0; i<=m; ++i){
    int ai;
    if(i != m) ai = an[i];
    else ai = n +1;
    int nhanko = ai -(i? an[i-1]:0) -1;
    if(nhanko != 0) hanko = min(hanko, nhanko);
  }
  //cout << "hanko:" << hanko << endl;
  for(int i=0; i<=m; ++i){
    int ai;
    if(i != m) ai = an[i];
    else ai = n +1;
    ans += (ai -(i? an[i-1]:0) +hanko -2) /hanko;
    //cout << i << ":" << ans << endl;
  }
  cout << ans << endl;
}
#include<bits/stdc++.h>
#define pb push_back
#define mk make_pair
#define ll long long
#define ss second
#define ff first
#define mod 1000000007
#define w(x) ll x; cin>>x; while(x--)
#define ps(x,y) fixed<<setprecision(y)<<x;
#define fo(i, j, k, in) for (ll i=j ; i<k ; i+=in)
#define re(i, j) fo(i, 0, j, 1)
#define pi acos(-1)
#define all(cont) cont.begin(), cont.end()
#define countbit(x) __builtin_popcount(x)
#define mod 1000000007
#define de(n) ll n;cin>>n;
#define def(a,n) ll n;cin>>n;ll a[n];re(i,n){cin>>a[i];}
#define defi(a,n,k) ll n;cin>>n; ll k;cin>>k;ll a[n];re(i,n){cin>>a[i];}
#define deb(x) cout<<#x<<"="<<x<<endl;
#define tr(it,a) for(auto it=a.begin();it!=a.end();it++)
#define nl cout<<endl;
using namespace std;
void cp()
{
    ios :: sync_with_stdio(false); cin.tie(0); cout.tie(0); 
    #ifndef ONLINE_JUDGE  
    freopen("input.txt", "r", stdin);  
    freopen("output.txt", "w", stdout);
#endif
}
//18-1326D1 1208B 845C 912B 1009B 1350C 20C 1333C 1234D 1327C 1305B 1304B (or in matrix)
int main()
{
   //cp();
   de(n);
   de(m);
   ll a[m];
   for(ll i=0;i<m;i++)
   cin>>a[i];
   sort(a,a+m);
   vector<ll>ans;
   if(m==0)
   cout<<1;
   else
   {
   if(a[0]-1!=0)
           ans.push_back(a[0]-1);
   for(ll i=1;i<m;i++)
   {
       if(i>0)
       {
           if(a[i]-a[i-1]-1!=0)
           ans.push_back(a[i]-a[i-1]-1);
       }
   }
   if(n-a[m-1]!=0)
   ans.push_back(n-a[m-1]);
   if(ans.size()==0)
   cout<<"0";
   else
   {
   sort(ans.begin(),ans.end());
    ll d=ans[0];
    ll an=0;
    ll ht=ans.size();
    for(ll i=0;i<ht;i++)
    {
        an+=(ans[i]/d);
        if(ans[i]%d!=0)
        an++;
    }
    cout<<an;
   }
   }
}