#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100010;
int a[MAXN];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, k;
  cin >> n >> k;
  if (k == n) {
    cout << "1\n";
    return 0;
  }
  int mn = (int)1e9, idx = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] < mn) {
      mn = a[i];
      idx = i;
    }
  }
  int ans = 0;
  int i = idx, j = idx;
  if (idx - k + 1 >= 0 && idx + k - 1 < n) {
    while (i > 0) {
      i -= (k - 1);
      ans++;
    }
    while (j < n - 1) {
      j += (k - 1);
      ans++;
    }
  } else {
    for (i = 0; i < n - 1;) {
      i += (k - 1);
      ans++;
    }
  }
  cout << ans << "\n";
  return 0;
}
