import math

def resolve():

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

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

	i = a.index(min(a)) + 1

	if k - 1 > i:

		v = max(0, math.ceil((n - k - 2) / (k - 1))) + 1

	else:

		v = math.ceil(i / (k - 1)) + math.ceil((n - i - 1) / (k - 1))

	print(v)

resolve()
import math

# def resolve():

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

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

# 	i = a.index(min(a)) + 1

# 	if k - 1 > i:

# 		v = max(0, math.ceil((n - k - 2) / (k - 1))) + 1

# 	else:

# 		v = math.ceil(i / (k - 1)) + math.ceil((n - i - 1) / (k - 1))

# 	print(v)



def resolve():

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

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

	v = math.ceil((n - k) / (k-1) + 1)

	print(v)

resolve()
import math


def resolve():
    n, k = list(map(int, input().split()))
    a = list(map(int, input().split()))
    i = a.index(min(a)) + 1
    if k - 1 > i:
        v = max(0, math.ceil((n - k - 2) / (k - 1))) + 1
    else:
        v = math.ceil(i / (k - 1)) + math.ceil((n - i - 1) / (k - 1))
    print(v)


resolve()

import math

# def resolve():
# 	n, k = map(int, input().split())
# 	a = list(map(int, input().split()))
# 	i = a.index(min(a)) + 1
# 	if k - 1 > i:
# 		v = max(0, math.ceil((n - k - 2) / (k - 1))) + 1
# 	else:
# 		v = math.ceil(i / (k - 1)) + math.ceil((n - i - 1) / (k - 1))
# 	print(v)
def resolve():
    n, k = list(map(int, input().split()))
    a = list(map(int, input().split()))
    v = math.ceil((n - k) / (k - 1) + 1)
    print(v)


resolve()

- +# def resolve(): +# 	n, k = map(int, input().split()) +# 	a = list(map(int, input().split())) +# 	i = a.index(min(a)) + 1 +# 	if k - 1 > i: +# 		v = max(0, math.ceil((n - k - 2) / (k - 1))) + 1 +# 	else: +# 		v = math.ceil(i / (k - 1)) + math.ceil((n - i - 1) / (k - 1)) +# 	print(v) -    i = a.index(min(a)) + 1 -    if k - 1 > i: -        v = max(0, math.ceil((n - k - 2) / (k - 1))) + 1 -    else: -        v = math.ceil(i / (k - 1)) + math.ceil((n - i - 1) / (k - 1)) +    v = math.ceil((n - k) / (k - 1) + 1)