#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  scanf("%d %d", &n, &k);
  int id = 0, q = INT_MAX;
  for (int i = 0; i < n; i++) {
    int x;
    scanf("%d", &x);
    if (x > q) {
      q = x;
      id = i + 1;
    }
  }
  int ans = (n - id - 2 + k) / (k - 1) + (id + k - 2) / (k - 1);
  printf("%d\n", ans);
  return 0;
}
