N, K = [int(nk) for nk in input().split()]

A = [int(a) for a in input().split()]

N -= K

cnt = 1

while N > 0:

  N -= K-1

  cnt += 1

print(cnt)
N, K = [int(nk) for nk in input().split()]

A = [int(a) for a in input().split()]

if (N-1) % (K-1) == 0:

  print(((N-1) // (K-1)))

else:

  print((((N-1) // (K-1)) + 1))
N, K = [int(nk) for nk in input().split()]
A = [int(a) for a in input().split()]
N -= K
cnt = 1
while N > 0:
    N -= K - 1
    cnt += 1
print(cnt)

N, K = [int(nk) for nk in input().split()]
A = [int(a) for a in input().split()]
if (N - 1) % (K - 1) == 0:
    print(((N - 1) // (K - 1)))
else:
    print((((N - 1) // (K - 1)) + 1))

-N -= K -cnt = 1 -while N > 0: -    N -= K - 1 -    cnt += 1 -print(cnt) +if (N - 1) % (K - 1) == 0: +    print(((N - 1) // (K - 1))) +else: +    print((((N - 1) // (K - 1)) + 1))