#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, K, S = 0;
  int A[120000];
  int ans = 0;
  cin >> N >> K;
  for (int i = 0; i < N; i++) cin >> A[i];
  if (K == 2)
    cout << N - 1 << endl;
  else if (N % (K - 1) > 1)
    cout << (N / (K - 1)) + 1 << endl;
  else
    cout << N / (K - 1) << endl;
}
