import math

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

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



print((math.ceil((N-1)/(K-1))))
import math

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

print((math.ceil((N-1)/(K-1))))
import math

N, K = list(map(int, input().split()))
A_list = [int(i) for i in input().split()]
print((math.ceil((N - 1) / (K - 1))))

import math

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

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