#!/usr/bin/env ruby

require 'set'

class Hash
  def push(key, value)
    self[key] = [] if self[key] == nil
    self[key].push(value)
  end
end

class Array
  def lower_bound(value)
    left = -1;
    right = self.length;
    while left + 1 < right
      mid = left + (right - left) / 2;
      if self[mid] >= value
        right = mid
      else
        left = mid
      end
    end
    right
  end

  def unique
    res = [self.first]
    each_cons(2) do |a, b|
      if a != b
        res.push(b)
      end
    end
    res
  end
end

def get_ints
  gets.chomp.split.map(&:to_i)
end

def get_ints_minus_one
  get_ints.map { |x| x - 1 }
end

def get_int
  gets.chomp.to_i
end

require 'bigdecimal'

N, K = get_ints
A = get_ints

# ax = A.sort.map { |a| [BigDecimal(a), 1, BigDecimal(a)] }
# count = 0
# while count < K
#   value, divided, first = ax.pop
#   value = first / (divided + 1)
#   next_value = [value, divided + 1, first]
#   index = ax.bsearch_index { |a| a[0] >= value }
#   if index.nil?
#     ax.push(next_value)
#   else
#     ax.insert(index, next_value)
#   end
#   count += 1
#   # p ax.map { |a| {value: a[:value].to_f, divided: a[:divided], first: a[:first].to_f} }
# end
#
# puts ax.last[0].ceil

ax = A.sort.map { |a| a.to_f }

high = ax.last.to_i
low = 0
while high - low > 1
  mid = (high + low) / 2

  index = ax.bsearch_index { |a| a > mid }
  count = 0
  ax[index..].each do |a|
    count += (a / mid).ceil - 1
  end

  if count <= K
    high = mid
  else
    low = mid
  end
end

puts high
