#include <bits/stdc++.h>
using namespace std;
int main() {
  int k, n;
  cin >> n >> k;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int b = n - 1;
  int c = k - 1;
  cout << (b + c - 1) / c << endl;
}
