# -*- coding: utf-8 -*-

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

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



ans = ((n - 1) + (k - 1) - 1) // (k - 1)

print(ans)

import math

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

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



ans = math.ceil((n - 1) / (k - 1))

print(ans)
# -*- coding: utf-8 -*-
n, k = list(map(int, input().split()))
a = [int(i) for i in input().split()]
ans = ((n - 1) + (k - 1) - 1) // (k - 1)
print(ans)

import math

n, k = list(map(int, input().split()))
a = list(map(int, input().split()))
ans = math.ceil((n - 1) / (k - 1))
print(ans)

-# -*- coding: utf-8 -*- +import math + -a = [int(i) for i in input().split()] -ans = ((n - 1) + (k - 1) - 1) // (k - 1) +a = list(map(int, input().split())) +ans = math.ceil((n - 1) / (k - 1))