# frozen_string_literal: true

n, k = gets.split.map(&:to_i)
@a = gets.split.map(&:to_f)

min = @a.min
max = @a.max

def count(x)
  c = 0
  @a.each do |e|
    c += (e / x).floor
  end
  c
end

c = (0.0..max).bsearch { |e| count(e) < k }

if c
  puts (max / (max / c).ceil).ceil
else
  puts max.to_i
end
