import math



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

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



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



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



if (n-1)%(k-1)==0:

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

else:

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

import math

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

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

-import math - -a = list(map(int, input().split())) -ans = math.ceil((n - 1) / (k - 1)) -print(ans) +if (n - 1) % (k - 1) == 0: +    print(((n - 1) // (k - 1))) +else: +    print(((n - 1) // (k - 1) + 1))