#include <bits/stdc++.h>
int upll(const void *a, const void *b) {
  return *(long long *)a < *(long long *)b   ? -1
         : *(long long *)a > *(long long *)b ? 1
                                             : 0;
}
int downll(const void *a, const void *b) {
  return *(long long *)a < *(long long *)b   ? 1
         : *(long long *)a > *(long long *)b ? -1
                                             : 0;
}
void sortup(long long *a, int n) { qsort(a, n, sizeof(long long), upll); }
void sortdown(long long *a, int n) { qsort(a, n, sizeof(long long), downll); }
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  for (int i = 0; i < n; i++) scanf("%*d");
  printf("%d\n", n <= k ? 1
                        : ((((int)ceil((float)(n - k) / (float)(k - 1))) > (1)
                                ? ((int)ceil((float)(n - k) / (float)(k - 1)))
                                : (1)) +
                           1));
}
