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

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

if n==k:

    print((1))

    exit()

i=n-k

ans=1

while i>0:

    i=i-k+1

    ans+=1

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

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

print((-(-(n-k)//(k-1))+1))

n, k = list(map(int, input().split()))
a = list(map(int, input().split()))
if n == k:
    print((1))
    exit()
i = n - k
ans = 1
while i > 0:
    i = i - k + 1
    ans += 1
print(ans)

n, k = list(map(int, input().split()))
a = list(map(int, input().split()))
print((-(-(n - k) // (k - 1)) + 1))

-if n == k: -    print((1)) -    exit() -i = n - k -ans = 1 -while i > 0: -    i = i - k + 1 -    ans += 1 -print(ans) +print((-(-(n - k) // (k - 1)) + 1))