    function Main(input) {
        input = input.trim().split("\n").map(function(x) { return x.split(" ")});
        let N = parseInt(input[0][0], 10);
        let K = parseInt(input[0][1], 10);
        let v_A = input[1].map(e => parseInt(e, 10));

        let q = new Heap();
        for (let x of v_A){
            q.push([x * -1, x, 1]);
        }

        let tmp;

        for(let i = 0; i < K; i++){
            tmp = q.pop();
            tmp[2] ++;
            tmp[0] = (tmp[1] / tmp[2]) * -1;
            q.push(tmp);
        }

        console.log(Math.ceil(q.pop()[0] * -1));
        
    }

    function Heap () {
        this.heap = new Array();
        this.size = 0;
    }
    Heap.prototype.push = function (val) {
        var k = this.size++;

        while( 0 < k ) {
            var p = Math.floor( (k - 1) / 2 );
            
            if( this.heap[p][0] <= val[0] ) break; //★
            
            this.heap[k] = this.heap[p].slice();
            k = p;
        }
        this.heap[k] = val.slice();
    }
    Heap.prototype.pop = function () {
        var ret = this.heap[0];
        var x = this.heap[--this.size];
        
        var k = 0;
        while( k * 2 + 1 < this.size ) {
            var a = k * 2 + 1;
            var b = k * 2 + 2;
            if( b < this.size && this.heap[b][0] < this.heap[a][0] ) a = b;
            
            if( x[0] <= this.heap[a][0] ) break; //★

            this.heap[k] = this.heap[a].slice();
            k = a;
        }
        this.heap[k] = x.slice();
        this.heap.length = this.size;
        return ret;
    }
    Heap.prototype.top = function () {
        return this.heap[0];
    }
    Heap.prototype.size = function () {
        return this.size;
    }


    Main(require("fs").readFileSync("/dev/stdin", "utf8"));
