#include <stdio.h>

int main(void)
{
   int n,k,a[100000],ans,i;

   scanf("%d%d",&n,&k);

   for(i=0;i<n;i++)
      scanf("%d",&a[i]);

   n--; k--;
   if((n/k)%=0) ans=n/k;
   else         ans=n-k+1;

   printf("%d\n",ans);

   return 0;
}
