N, K = list(map(int,input().split()))

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

if (N-1) % (K-1) == 0:

	print(((N-1)//(K-1)))

else:

  	print(((N-1)//(K-1)+1))


nk = eval(input())

n, k = nk.split()

n = int(n)

k = int(k)



an = eval(input())

an_list = an.split()

min = min(an_list)











if (n-1)%(k-1)==0:

    res = (n-1)//(k-1)

else:

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



print(res)

N, K = list(map(int, input().split()))
A = list(map(int, input().split()))
if (N - 1) % (K - 1) == 0:
    print(((N - 1) // (K - 1)))
else:
    print(((N - 1) // (K - 1) + 1))

nk = eval(input())
n, k = nk.split()
n = int(n)
k = int(k)
an = eval(input())
an_list = an.split()
min = min(an_list)
if (n - 1) % (k - 1) == 0:
    res = (n - 1) // (k - 1)
else:
    res = (n - 1) // (k - 1) + 1
print(res)

-N, K = list(map(int, input().split())) -A = list(map(int, input().split())) -if (N - 1) % (K - 1) == 0: -    print(((N - 1) // (K - 1))) +nk = eval(input()) +n, k = nk.split() +n = int(n) +k = int(k) +an = eval(input()) +an_list = an.split() +min = min(an_list) +if (n - 1) % (k - 1) == 0: +    res = (n - 1) // (k - 1) -    print(((N - 1) // (K - 1) + 1)) +    res = (n - 1) // (k - 1) + 1 +print(res)