n, k = list(map(int, input().split()))

a = list(map(int, input().split()))



if k < n:

    c = 1

    n -= k

    while n > 0:

        n -= k-1

        c += 1

    print(c)

else:

    print((1))
n, k = list(map(int, input().split()))

a = list(map(int, input().split()))



if k < n:

    c = 1

    n -= k

    c += -((-n)//(k-1))

    print(c)

else:

    print((1))
n, k = list(map(int, input().split()))
a = list(map(int, input().split()))
if k < n:
    c = 1
    n -= k
    while n > 0:
        n -= k - 1
        c += 1
    print(c)
else:
    print((1))

n, k = list(map(int, input().split()))
a = list(map(int, input().split()))
if k < n:
    c = 1
    n -= k
    c += -((-n) // (k - 1))
    print(c)
else:
    print((1))

-    while n > 0: -        n -= k - 1 -        c += 1 +    c += -((-n) // (k - 1))