import math



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

[int(i) for i in input().split()]

print((math.ceil((n-k) / (k - 1) + 1)))
import math

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

print((math.ceil((n-k) / (k - 1) + 1)))

import math

n, k = list(map(int, input().split()))
[int(i) for i in input().split()]
print((math.ceil((n - k) / (k - 1) + 1)))

import math

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

-[int(i) for i in input().split()]