#include <bits/stdc++.h>
int main() {
  int k, n, i, mark, ans, ans1, ans2;
  scanf("%d %d", &n, &k);
  int a[n];
  for (i = 1; i < n; i++) {
    scanf("%d ", &a[i]);
    if (a[i] == 1) mark = i;
  }
  ans1 = i / (k - 1);
  if (i % (k - 1) != 0) ans1++;
  ans2 = (n - i) / (k - 1);
  if ((n - i) % (k - 1) != 0) ans2++;
  ans = ans1 + ans2;
  printf("%d\n", ans);
}
