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

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



p = 0

cnt= 0



while p < n - 1:

    p += k - 1

    cnt += 1

print(cnt)
import math

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

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



print((int(math.ceil((n-1)/(k-1)))))
n, k = list(map(int, input().split()))
a = list(map(int, input().split()))
p = 0
cnt = 0
while p < n - 1:
    p += k - 1
    cnt += 1
print(cnt)

import math

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

+import math + -p = 0 -cnt = 0 -while p < n - 1: -    p += k - 1 -    cnt += 1 -print(cnt) +print((int(math.ceil((n - 1) / (k - 1)))))