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

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



cnt=k

ans=1

while cnt<n:

    cnt+=k-1

    ans+=1



print(ans)
import math

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

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



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

import math

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

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