import std.functional,
       std.algorithm,
       std.container,
       std.typetuple,
       std.typecons,
       std.bigint,
       std.string,
       std.traits,
       std.array,
       std.range,
       std.stdio,
       std.conv;

void main() {
  int[] NK = readln.chomp.split.to!(int[]);
  int N = NK[0],
      K = NK[1];
  int[] A = readln.chomp.split.to!(int[]);
  int ans = 1;

  ans += (N - K) / (K - 1);
  if ((N - K) % (K - 1) != 0) {
    ans++;
  }

  writeln(ans);
}
