#include<bits/stdc++.h>
using namespace std;

#define int long long
#define pb push_back
#define f(i,a,n) for(int i=a ; i<n ; i++)
#define rf(i,n,a) for(int i=n ; i>=a ; i--)
#define F first
#define S second
#define all(c) (c).begin(),(c).end()
#define sz(v) (int)(v).size()
#define fast ios::sync_with_stdio(0); cin.tie(0); cout.tie(0)

typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
typedef vector<int> vi;

const int inf = 1e9;
const int inf64 = 1e18;
const int MOD = inf + 7;

void solve(){
   int n;
   cin >> n;

   int m;
   cin >> m;

   int a[m+2];
   f(i,0,m) cin >> a[i];

   a[m] = 0;
   a[m+1] = n+1;

   sort(a, a+m+2);
   int gc = n;
   f(i,0,m+1) if(a[i+1] != a[i] + 1) gc = min(gc, a[i+1] - a[i] - 1);

   int ans = 0;
   f(i,0,m+1) ans += (a[i+1] - a[i] - 1 + gc - 1)/gc;

   cout << ans << "\n";

}

int32_t main(){
   fast;
   int t = 1;
   // cin >> t;
   while(t--)  solve();   
}

/*****************************************JAI SHREE RAM***************************************************/


#include<bits/stdc++.h>
using namespace std;

#define ll  long long
#define rep(i,n)  for((i)=0;(i)<(n);(i)++)
#define rep1(i,n) for((i)=1;(i)<=(n);(i)++)

int main()
{
    ll n, k;
    cin >> n >> k;
    int ans;
    while(k--)
    {
        string s = to_string(n);
        sort(s.begin(),s.end());
        ll e = stoll(s);
        reverse(s.begin(),s.end());
        ll f = stoll(s);
        n = f - e;
        if(n==0)
        break;
    }
    
    cout << n;
   
    return 0;
}



