#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
using namespace std;
using ll = long long ;
#define rep(i,n) for (int i=0; i < (n); ++i)

const ll lim = 1e18 ;

int main() {
    int n,m ;
    cin >> n >> m ;
    if(m==0){
        cout << 1 << endl ;
        return 0 ;
    }
    if(n==m){
        cout << 0 << endl ;
        return 0 ;
    }
    vector<int> a(m) ;
    rep(i,m){
        cin >> a[i] ;
    }
    a.push_back(0) ;
    a.push_back(n+1) ;
    sort(a.begin(),a.end()) ;

    int st = 1e9 ;
    for(int i=0;i<a.size()-1;i++){
        if(a[i+1]-a[i]-1==0) continue ;
        st = min(a[i+1]-a[i]-1,st) ;
    }
    //cout << st << endl ; 

    int ans = 0 ;
    for(int i=0;i<a.size()-1;i++){
        ans += (a[i+1]-a[i]-1+st-1)/st ;
    }
    cout << ans << endl ; 
 return 0 ;
}  

#include <bits/stdc++.h>
#define loop(n) for(ll i=0;i<n;i++)
#define loopj(n) for(ll j=0;j<n;j++)
#define loopR(i,a,b,c) for(ll i=a;i>=b;i-=c)
#define rng(i,a,b,c) for(ll i = a; i<b;i+=c)
#define loop2(i,a,b) for(long long i = a; i>=b;i--)
#define loop3(j,a,b) for(int j = a; j<b;j++)
#define fast ios_base::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL)
#define ll long long   
#define ld long double
#define SET set<ll>
#define pb push_back
#define mp make_pair
#define gc getchar_unlocked
#define in ll n;cin>>n;
#define all(s) s.begin(),s.end()
 
ll mod=pow(10,9)+7;
using namespace std; 
//--------------------------\\
//code once think twice
 
 
ll gcd(ll a,ll b)
{
	if(b==0)
	return a;
	
	return gcd(b,a%b);
}
 
 
void go()
{
	ll a,b;
	cin>>a>>b;
	if(min(a,b)+3>max(a,b))
	cout<<"Yes";
	else
	cout<<"No";
	
}
	
 
  
int main() 
{ 
    
int t; 
 
fast;
//cin>>t; 
// 
//loop(t)
go();
}