from math import ceil

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

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



r = ceil((N-1) / (K-1))

print(r)
from math import ceil

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

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

A = eval(input())  # dummy read



r = ceil((N-1) / (K-1))

print(r)
from math import ceil

N, K = list(map(int, input().split()))
A = list(map(int, input().split()))
r = ceil((N - 1) / (K - 1))
print(r)

from math import ceil

N, K = list(map(int, input().split()))
# A = list(map(int, input().split()))
A = eval(input())  # dummy read
r = ceil((N - 1) / (K - 1))
print(r)

-A = list(map(int, input().split())) +# A = list(map(int, input().split())) +A = eval(input())  # dummy read