import std;

alias sread = () => readln.chomp();
alias lread = () => readln.chomp.to!long();
alias aryread(T = long) = () => readln.split.to!(T[]);
//aryread!string();
//auto PS = new Tuple!(long,string)[](M);
//x[]=1;でlong[]全要素1に初期化
void main()
{
    long n, k;
    scan(n, k);
    auto a = aryread();
    // writeln(a);
    // writeln(ceil(a.length / k) * (k - 1)
    // long ans = ((a.length + k - 1) / k) * (k - 1);
    // writeln(ans);
    long i = 0;
    long cnt;
    while (i < n)
    {
        i += k;
        if (i == n)
        {
            cnt += 1;
            break;
        }
        i -= 1;
        cnt += 1;
    }
    writeln(cnt);
}

void scan(L...)(ref L A)
{
    auto l = readln.split;
    foreach (i, T; L)
    {
        A[i] = l[i].to!T;
    }
}

void arywrite(T)(T a)
{
    a.map!text.join(' ').writeln;
}
