#include<bits/stdc++.h>
#define ll long long
#define mp make_pair
#define f(i,n) for(int i=0;i<n;i++)
#define F first
#define S second
#define pb push_back
using namespace std;
void test(){
ll n,m;
cin>>n>>m;
if(m==0){
cout<<"1\n";
return ;
}
vector<ll> a(m);
f(i,m)cin>>a[i];
sort(a.begin(),a.end());
if(a[m-1]!=n)a.pb(n+1);
if(a[0]!=1)a.pb(0);
sort(a.begin(),a.end());
vector<ll> v;
f(i,a.size()-1){
if(a[i+1]-a[i]-1!=0)
v.pb(a[i+1]-a[i]-1);
}
if(v.size()==0){
cout<<"0\n";
return ;
}
sort(v.begin(),v.end());
ll dif = v[0];
ll res = 0;
f(i,v.size()){
res = res + (v[i]/dif);
if(v[i]%dif!=0)res++;
}
cout<<res<<"\n";
}
int main(){
std::ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int tests=1;
// cin>>tests;
while(tests--){
test();
}
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KI2RlZmluZSBsbCBsb25nIGxvbmcgCiNkZWZpbmUgbXAgbWFrZV9wYWlyIAojZGVmaW5lIGYoaSxuKSBmb3IoaW50IGk9MDtpPG47aSsrKSAKI2RlZmluZSBGIGZpcnN0IAojZGVmaW5lIFMgc2Vjb25kIAojZGVmaW5lIHBiIHB1c2hfYmFjayAKCnVzaW5nIG5hbWVzcGFjZSBzdGQ7Cgp2b2lkIHRlc3QoKXsKCWxsIG4sbTsKCWNpbj4+bj4+bTsKCQoJaWYobT09MCl7CgkJY291dDw8IjFcbiI7CgkJcmV0dXJuIDsKCX0KCQoJdmVjdG9yPGxsPiBhKG0pOwoJZihpLG0pY2luPj5hW2ldOwoJc29ydChhLmJlZ2luKCksYS5lbmQoKSk7CglpZihhW20tMV0hPW4pYS5wYihuKzEpOwoJaWYoYVswXSE9MSlhLnBiKDApOwoJc29ydChhLmJlZ2luKCksYS5lbmQoKSk7CgkKCXZlY3RvcjxsbD4gdjsKCQoJZihpLGEuc2l6ZSgpLTEpewoJCWlmKG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