#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <bits/stdc++.h>

#define mod 1000000007
#define MAXX  1e18
#define MINN -1e18

#define ll long long
#define pb push_back
#define all(a) a.begin(), a.end()
#define fastio  ios_base::sync_with_stdio(false); cin.tie(NULL);
#define add(a, b) (((a)%mod + (b)%mod + mod)%mod)
#define mul(a, b) (((a)%mod * (b)%mod) % mod)
#define endl cout<<"\n";
#define debug(vari) cerr<< "["<< #vari << "" << (vari) << "]";endl;
#define read(a) for(auto &i: a) cin >> i;
#define out(a)  for(auto i: a) cout << i << " ";endl
#define ordered_set tree<int, null_type, std::less<int>, rb_tree_tag, tree_order_statistics_node_update>

using namespace __gnu_pbds;
using namespace std;

int main() {
    fastio
    int n, k; cin >> n >> k;
    vector<int> a(n); read(a);
    int ans = ((n-1)%(k-1) == 0) ? (n-1)/(k-1) : (n-1)/(k-1) + 1;
    cout << ans << "\n";
}