#include <bits/stdc++.h>
using namespace std;
bool kk = true;
bool rr[3];
int main() {
  int n, k;
  cin >> n >> k;
  int ans = 1;
  int ans2 = 0;
  int s = n;
  for (int e = 0; e < n; e++) {
    int rr;
    cin >> rr;
  }
  while (n > 0) {
    n -= (k - 1);
    ans2++;
  }
  cout << min(s - 1 / k - 1, ans2);
}
