function Main(s){
  s = s.split("\n");
  var n = s[0].split(" ").map(a=>+a);
  var k = n[1];
  n = n[0];
  var a = s[1].split(" ").map(a=>+a);
  var x = a.findIndex(a=>a===1);
  console.log(Math.ceil((n-1)/(k-1)));
}
Main(require("fs").readFileSync("/dev/stdin","utf8"));