import kotlin.math.*

fun list() = readLine()!!.split(" ").map {it.toInt()}

fun binarySearch(ok:Int,ng:Int,eps:Int,f:(Int)->Boolean):Int {
	var _ok = ok
	var _ng = ng
	while(abs(_ok-_ng)>eps) {
		val mid = (_ok+_ng)/2
		if(f(mid))
			_ok = mid
		else
			_ng = mid
	}
	return _ok
}

fun main() {
	val (n,k) = list()
	val a = list()
	println(binarySearch(1000000000,0,1) {l->
		a.map {(it+l-1)/l-1}.sum()<=k
	})
}
