#include <bits/stdc++.h>
using namespace std;
int main()
{
    long long n,k,res=0,pos,mini=9999999999999,val;
    int a[100007];
    cin>>n>>k;
    for(int i=1;i<=n;i++)
    {
        cin>>a[i];
        if(a[i]<mini)
        {
            pos=i;
            mini=a[i];

        }
    }
    if(pos<=k)
    {
        res=1+ceil((n-k)*1.0/(k-1));

    }

    else
    {
        if(pos==n)
        {
            res=1+ceil((n-k)*1.0/(k-1));
        }
        else{
        val=n-(pos-1);

        res=1+ceil((val-k)*1.0/(k-1));
        res+=1+ceil((pos-k)*1.0/(k-1));
        }

    }
    cout<<res<<endl;

    return 0;
}
