n, k = map(int, input().split())
As = list(map(int, input().split()))
a=n-1
b=k-1
if a % b == 0:
  print(a//b)
else:
  print((a//b) + 1)
1d7228150531f85c4479e2fadf0eba5fa83b8840
<mask token>

<mask token>
if a % b == 0:
    print(a // b)
else:
    print(a // b + 1)

n, k = map(int, input().split())
As = list(map(int, input().split()))
a = n - 1
b = k - 1
if a % b == 0:
    print(a // b)
else:
    print(a // b + 1)

n, k = map(int, input().split())
As = list(map(int, input().split()))
a=n-1
b=k-1
if a % b == 0:
  print(a//b)
else:
  print((a//b) + 1)