#include <bits/stdc++.h>
using namespace std;
long long power(long long x, long long y) {
  long long ret = 1;
  while (y > 0) {
    if (y & 1) ret = (ret * x);
    y /= 2;
    x = (x * x);
  }
  return ret;
}
long long get(long long n) {
  long long ret = 0;
  while (n) {
    ret += n % 10;
    n /= 10;
  }
  return ret;
}
void solve() {
  long long n, k, i, pos = 0;
  cin >> n >> k;
  vector<long long> vec(n);
  for (i = 0; i < n; i++) {
    cin >> vec[i];
    if (vec[i] == 1) {
      pos = i;
    }
  }
  if (n == 1) {
    cout << 0 << '\n';
    return;
  }
  if (n == k) {
    cout << 1 << '\n';
    return;
  }
  cout << n / (k - 1) << '\n';
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0);
  long long test = 1;
  while (test--) {
    solve();
  }
}
