import sys

read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

readlines = sys.stdin.buffer.readlines

sys.setrecursionlimit(10 ** 7)



n, k = list(map(int, readline().split()))

a = list(map(int, readline().split()))

print(((n - 2) // (k - 1) + 1))

import sys

read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

readlines = sys.stdin.buffer.readlines

sys.setrecursionlimit(10 ** 7)



n, k, *a = list(map(int, readline().split()))

print(((n - 2) // (k - 1) + 1))

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**7)
n, k = list(map(int, readline().split()))
a = list(map(int, readline().split()))
print(((n - 2) // (k - 1) + 1))

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**7)
n, k, *a = list(map(int, readline().split()))
print(((n - 2) // (k - 1) + 1))

-n, k = list(map(int, readline().split())) -a = list(map(int, readline().split())) +n, k, *a = list(map(int, readline().split()))