#include<bits/stdc++.h>
#define FOR(i, a, b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i, 0, n)
#define all(x) (x).begin(),(x).end()
const int INF = 1e9+1;
using namespace std;
using ll = long long;
using p = pair<int, int>;
using v = vector<int>;

int main(){
  int N, M;
  cin >> N >> M;
  vector<bool> A(N+1, false);
  REP(i, M) {
    int B;
    cin >> B;
    A[B-1] = true;
  }
  A[N] = true;
  v C;
  int c = 0;
  int k = N;
  REP(i, N+1) {
    if (A[i]) {
      if (c > 0) {
        k = min(k, c);
        C.push_back(c);
      }
      c = 0;
      // cout << "o";
    } else {
      // cout << "x";
      c++;
    }
  }
  // cout << endl;
  // cout << "k:" << k << endl;
  int n = C.size();
  int ans = 0;
  REP(i, n) {
    ans += ceil((double)C[i]/k);
    // cout << C[i] << " ";
  }
  // cout << endl;
  cout << ans << endl;
  return 0;
}
#include <bits/stdc++.h>
#define ll long long
#define V vector<long long>
#define VV vector<vector<long long>>
#define VVV vector<vector<vector<long long>>>
#define P pair<ll,ll>
#define rep(i,n) for(ll (i)=0;(i)<(n);++(i))
using namespace std;

int main() {
    ll n,m;
    cin>>n>>m;
    V a(m);
    rep(i,m)cin>>a[i];
    if(m==0){
        cout<<1<<endl;
        return 0;
    }
    sort(a.begin(),a.end());
    V res;
    if(a[0]-1>0)res.push_back(a[0]-1);
    rep(i,m-1)if(a[i+1]-a[i]>1)res.push_back(a[i+1]-a[i]-1);
    if(n-a[m-1]>0)res.push_back(n-a[m-1]);
    if(res.size()==0){
        cout<<0<<endl;
        return 0;
    }
    ll k=*min_element(res.begin(), res.end());
    ll ans=0;
    for(ll r:res)ans+=(r+k-1)/k;
    cout<<ans<<endl;
}
