#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a < b) {
    a ^= b;
    b ^= a;
    a ^= b;
  }
  return b ? gcd(b, a % b) : a;
}
int lcm(int a, int b) { return a * b / gcd(a, b); }
int main() {
  int N, K;
  cin >> N >> K;
  int A;
  for (int i = 0; i < N; i++) cin >> A;
  cout << ((N - 1) / (K - 1 - 1)) / (K - 1) << endl;
}
