import numpy as np

import statistics



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

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



print(((N-1+K-2)//(K-1)))
# coding: utf-8

import sys



sr = lambda: sys.stdin.readline().rstrip()

ir = lambda: int(sr())

lr = lambda: list(map(int, sr().split()))



N, K = lr()

A = lr()

answer = -(-(N-1)//(K-1))

print(answer)

import numpy as np
import statistics

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

# coding: utf-8
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))
N, K = lr()
A = lr()
answer = -(-(N - 1) // (K - 1))
print(answer)

-import numpy as np -import statistics +# coding: utf-8 +import sys -N, K = list(map(int, input().split())) -A = list(map(int, input().split())) -print(((N - 1 + K - 2) // (K - 1))) +sr = lambda: sys.stdin.readline().rstrip() +ir = lambda: int(sr()) +lr = lambda: list(map(int, sr().split())) +N, K = lr() +A = lr() +answer = -(-(N - 1) // (K - 1)) +print(answer)