#include <bits/stdc++.h>
using namespace std;
#define int long long int
#define watch(x) cout << (#x) << " is " << (x) << endl
#define MOD 1000000007

int gcd(int a,int b){
  if(a==0 || b==0){
    return (a+b);
  }
  return gcd(b,a%b);
}

vector<int> sieve(int n){
  vector<int> v(n+2,0);
  n++;
  v[0]=1;
  for(int i=2;i*i<n;i++){
    if(!v[i])
      for(int j=2*i;j<n;j+=i)
        v[j]++;
  }
  return v;
}

int fastExpo(int a,int n,int mod){
  int result = 1;
  while ( n > 0){
    if ( n&1 )
      result = (result*a)%mod;
    a=(a*a)%mod;
    n>>=1;
  }
  return result;
}

int modInverse(int n,int mod){
  return fastExpo(n,mod-2,mod);
}

vector<int> factorial(int n){
  std::vector<int> fac(n+2,0);
  fac[0] = 1;
  for (int i = 1; i <= n; i++)
      fac[i] = (fac[i - 1] * i) % MOD;

  return fac;
}

int __nCr(int n,int r, vector<int>& Fact,int mod){
    int ans= (((Fact[n] * modInverse(Fact[r],mod))%mod)
    *modInverse(Fact[n-r],mod))%mod;
    return ans;
}

class Triplet{
 public:
   int x;
   int y;
   int gcd;
};
Triplet extendedEuclid(int a,int b){
  if(b==0){
    Triplet obj;
    obj.x=1;
    obj.y=0;
    obj.gcd=a;
    return obj;
  }
  Triplet smallans = extendedEuclid(b,a%b);
  Triplet ans;
  ans.gcd=smallans.gcd;
  ans.x=smallans.y;
  ans.y= smallans.x-(a/b)*smallans.y;
  return ans;
}

/*---------------------------------------------------------*/


void solve(int T)
{
  int n,m;
  cin >>  n >> m;
  int arr[m];
  for(auto &i: arr)
    cin >> i;

  if(m==0){
    cout<<1<<endl;
    return;
  }
  sort(arr,arr+m);
  int d=INT_MAX;
  if(arr[0]!=1){
    d=arr[0]-1;
  }
  if(arr[m-1]!=n){
    d=min(d,n-arr[m-1]);
  }
  for(int i=1;i<m;i++){
    int gap=(arr[i]-arr[i-1])-1;
    if(gap!=0){
      d=min(d,gap);
    }
  }
  //cout<<d<<endl;
  if(d==0 || m==n){
    cout<<0<<endl;return;
  }
  int last=0;
  int ans=0;
  for(int i=0;i<m;i++){
    int g=(arr[i]-last)-1;
    if(g<0){
      continue;
    }
    ans+=ceil((1.0*g)/d);
    last=arr[i];
  }
  ans+=ceil(1.0*(n-last)/d);
  cout<<ans<<endl;
}

int32_t main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

#ifndef ONLINE_JUDGE
    freopen("inputf.in", "r", stdin);
    freopen("error.out", "w", stderr);
    freopen("outputf.out", "w", stdout);
#endif

    int T = 1;
    //cin >> T;
    for (int t=1;t<=T; t++) {
        solve(t);
    }

    cerr << "time taken : " << (float)clock() / CLOCKS_PER_SEC << " secs" << endl;
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i,n) for(int i=0;i<n;i++)
const ll MOD=20000000000000000;
const long double PI=3.14159265358979;
const ll MAX=100000;



int main() {
  ll N,M;
  cin>>N>>M;
  ll a[M+2];
  rep(i,M){
    cin>>a[i+1];
  }
  a[0]=0;a[M+1]=N+1;
  sort(a,a+M+2);
  
  vector<ll> w;
  rep(i,M+1){
    if(a[i+1]-a[i]>1){
      w.push_back(a[i+1]-a[i]-1);
    }
  }
  ll minw=MOD;
  ll ws=w.size();
  rep(i,ws){
    minw=min(minw,w[i]);
  }
  ll ans=0;
  rep(i,ws){
    ans+=(w[i]-1)/minw+1;
    //cout<<w[i]<<ans;
  }
  cout<<ans;
  
}