#include<bits/stdc++.h>
#define rep(i,n) for(int i=0; i<(n); i++)
using namespace std;
using ll=long long;
int main(void){
  int n,m; cin >> n >> m;
  if(m==0){
    cout << 1 << endl;
    return 0;
  }
  vector<int> a(m);
  rep(i,m){
    cin >> a[i];
    a[i]--;
  }
  sort(a.begin(),a.end());
  //set<int> s;
  vector<int> s;
  int count=0,sansyo=0;
  rep(i,n){
    if(i!=a[sansyo]) count++;
    
    if(i==a[sansyo]){
      sansyo++;
      //a.erase(a.begin());
      //s.insert(count);
      if(count!=0) s.push_back(count);
      count=0;
    }
    if(i==n-1&&count!=0) s.push_back(count);
    
  }
  if(s.size()==0){
    cout << 0 << endl;
    return 0;
  }
  sort(s.begin(),s.end());
  int k=s[0],ans=0;
  
  
  rep(i,s.size()){
    if(s[i]%k==0) ans += s[i]/k;
    if(s[i]%k!=0) ans += s[i]/k+1;
  }
  
  cout << ans << endl;
}

#include <iostream>
#include <algorithm>
using namespace std;
int a[500005];
int main(int argc, char** argv) {
	int n,m;
	cin >> n >> m;
	for(int i=1;i<=m;i++)
		cin >> a[i];
	sort(a+1,a+m+1);
	a[m+1]=n+1;
	int mn=1e9;
	for(int i=1;i<=m+1;i++)
		if(a[i]-a[i-1]-1) mn=min(mn,a[i]-a[i-1]-1);
	int ans=0;
	for(int i=1;i<=m+1;i++)
		ans+=(a[i]-a[i-1]-1+mn-1)/mn;
	cout << ans;
	return 0;
}