unittest
{
	assert( [ "2 3", "7 9" ].solve == 4 );
	assert( [ "3 0", "3 4 5" ].solve == 5 );
	assert( [ "10 10", "158260522 877914575 602436426 24979445 861648772 623690081 433933447 476190629 262703497 211047202" ].solve == 292638192 );
}



import std.algorithm;
import std.conv;
import std.format;
import std.math;
import std.range;
import std.stdio;

void main()
{
	stdin.byLineCopy.solve.writeln;
}

auto solve( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto n = 0L;
	auto k = 0L;
	input.front.formattedRead!"%s %s"( n, k );
	input.popFront;
	auto as = input.front.split.to!( real[] );
	
	// 最小の長さを決め打ちして、それをK回の切断で達成できるかを二分探索
	auto f( real x )
	{
		auto t = 0L;
		foreach( a; as )
		{
			t += cast( long ) ceil( a / x ) - 1;
			if( k < t ) return false;
		}
		return true;
	}
	return cast( long ) ceil( bisect!f( 0.0L, as.reduce!max ) );
}

// 単調増加or減少関数の二分探索
auto bisect( alias pred )( real ng, real ok )
if( is( typeof( pred( ng ) ) : bool ) )
{
	foreach( i; 0 .. 200 )
	{
		auto x = ( ok + ng ) / 2;
		if( pred( x ) ) ok = x;
		else            ng = x;
	}
	return ok;
}
