#include <bits/stdc++.h>
// #include <atcoder/all>
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define rep1(i,n) for(int i = 1; i <= (n); ++i)
// #define MOD 998'244'353
// #define MOD 1'000'000'007
// #define INF 1'000'000'000'000'000'000
using namespace std;
// using namespace atcoder;
typedef long long ll;

int main(){
    ll N;
    cin >> N;
    int M;
    cin >> M;

    if (M == 0){
        cout << 1 << endl;
        return 0;
    }

    vector<ll> A(M+1);
    A[0] = 0;
    rep1(i, M) cin >> A[i];

    if (N == M){
        cout << 0 << endl;
        return 0;
    }
    
    sort(A.begin(), A.end());

    vector<ll> dif(M+1);
    rep(i, M){
        dif[i] = A[i+1] - A[i] - 1;
    }
    dif[M] = N - A[M];

    sort(dif.begin(), dif.end());
    int pos = 0;
    while(dif[pos] == 0){
        pos++;
    }
    ll k = dif[pos];

    // cout << k << endl;
    ll ans = 0;

    for(int i = pos; i <= M; i++){
        if (dif[i] % k == 0){
            ans += dif[i] / k;
        }else{
            ans += (dif[i] / k + 1);
        }
    }
    

    cout << ans << endl;

    return 0;
}
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <initializer_list>
#include <cmath>

#define REP(i, n)       for(int i = 0; i < (n); i++)
#define REPS(i, a, b)   for(int i = (a); i <= (b); i++)
#define REPR(i, n)      for(int i = (n) - 1; i >= 0; i--)
#define REPRS(i, b, a)  for(int i = (b) ; i >= (a); i--)
#define ALL(x)          (x).begin(), (x).end()
#define ALLR(x)         (x).rbegin(), (x).rend()

constexpr static int MOD = 1e8 + 7;

inline void scan() {}

template <typename T, typename... U>
inline void scan(T&& t, U&&... u) {
  std::cin >> t;
  scan(std::forward<U>(u)...);
}

template <typename T>
inline void scana(T t, int n) {
  for (int i = 0; i < n; i++) {
    std::cin >> t[i];
  }
}

template <typename T>
inline void scana(T t, int n, int m) {
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      std::cin >> t[i][j];
    }
  }
}

inline void print() {
  std::cout << "\n";
}

template <typename T, typename... U>
inline void print(T&& t, U&&... u) {
  std::cout << t;
  print(std::forward<U>(u)...);
}

using graph = std::vector<std::vector<int>>;
using ll = long long;
using ull = unsigned long long;

ll pow(ll x, ll n) {
  if (n == 0) return 1;
  ll val = pow(x, n / 2);
  val *= val;
  if (n % 2 == 1) val *= x;
  return val;
}

int main() {
  int n;
  scan(n);
  
  int ans = static_cast<int>(std::sqrt(2 * n));
  while (true) {
    if ((ans * (ans + 1)) >= 2 * n) {
      break;
    } else {
      ans++;
    }
  }

  print(ans);
  
  
  return 0;
}