#include <bits/stdc++.h>

using namespace std;

long long divceil(long long a, long long b) {
	if(a % b == 0) return a / b; 
	return a / b + 1;
}

int main(void) {
	long long N, M;
	cin >> N >> M;
	if(M == 0) {
		cout << "1\n";
		return 0;
	}
	vector<long long> A;
	for(int i = 0; i < M; ++i) {
		long long a;
		cin >> a;
		--a;
		A.push_back(a);
	}
	sort(A.begin(), A.end());
	vector<long long> diffs;
	for(int i = 0; i <= M; ++i) {
		if(i == 0) {
			if(A[0] > 0) diffs.push_back(A[0]);
		} else if(i == M) {
			if(N - 1 > A[M - 1]) diffs.push_back(N - 1 - A[M - 1]);
		} else {
			if(A[i] - A[i - 1] > 1) diffs.push_back(A[i] - A[i - 1] - 1);
		}
	}
	long long m = LLONG_MAX;
	for(auto d : diffs) {
		m = min(m, d);
	}
	long long ans = 0;
	for(auto d : diffs) {
		ans += divceil(d, m);
	}
	cout << ans << '\n';
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define lvector vector<ll>
#define cvector vector<char>
#define svector vector<string>
#define lque queue<ll>
#define lpque priority_queue<ll>
#define dlpque priority_queue<ll,lvector,greater<ll>>
#define P pair<ll,ll>
#define ALL(a) a.begin(),a.end()
#define RALL(a) a.rbegin(),a.rend()
#define rep(i,n) for(ll i=0; i<n; ++i)
#define print(a) cout << (a) << endl

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  ll n,m;cin>>n>>m;
  if(m==0) print(1);
  else {
    lvector A(m+2),B(m+1,0);A[0]=0;A[m+1]=n+1;
    ll k=1e9,ans=0;
    rep(i,m) cin>>A[i+1];
    sort(ALL(A));
    rep(i,m+1) {
      B[i]=max(0ll,A[i+1]-A[i]-1);
      if(B[i]>0) k=min(k,B[i]);
    }
    for(ll b:B) ans+=(b+k-1)/k;
    print(ans);
  }
  return 0;
}