#include <bits/stdc++.h>
using namespace std;
float N, K;
int main() {
  int a;
  cin >> N >> K;
  vector<int> A;
  for (int i = 0; i < N; i++) {
    cin >> a;
    A.push_back(a);
  }
  float ans = ceil((N - 1) / (K - 1));
  cout << ans << endl;
  return 0;
}
