# ABC099C - Minimization

from math import ceil



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

_ = list(map(int, input().rstrip().split()))

print((1 + ceil((N - K) / (K - 1))))
# ARC099C - Minimization

from math import ceil



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

print((1 + ceil((N - K) / (K - 1))))
# ABC099C - Minimization
from math import ceil

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

# ARC099C - Minimization
from math import ceil

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

-# ABC099C - Minimization +# ARC099C - Minimization -_ = list(map(int, input().rstrip().split()))