
import std.algorithm;
import std.conv;
import std.math;
import std.stdio;
import std.string;

void main()
{
	auto nk = readln.split.to!( int[] );
	auto as = readln.split.to!( int[] );
	writeln( solve( nk[ 1 ], as ) );
}

auto solve( in int k, in int[] as )
{
	auto mi = as.length - minPos( as ).length;
	auto re = ( mi < k ) ? 1 : 2;
	return re + cast( int )( ceil( cast( double )( as.length - k ) / ( k - 1 ) ) );
}

unittest
{
	assert( solve( 3, [ 2, 3, 1, 4 ] ) == 2 );
	assert( solve( 3, [ 1, 2, 3 ] ) == 1 );
	assert( solve( 3, [ 7, 3, 1, 8, 4, 6, 2, 5 ] ) == 4 );
	assert( solve( 3, [ 7, 3, 8, 1, 4, 6, 2, 5, 9 ] ) == 5 );
}
