main :: IO ()
main = do
  [_, k] <- map read . words <$> getLine :: IO [Integer]
  a      <- map read . words <$> getLine :: IO [Integer]
  let countOps t =
        sum $ map (\l -> l `div` t + if l `mod` t == 0 then -1 else 0) a
  let binarySearch lo hi | lo + 1 == hi     = hi
                         | countOps mid > k = binarySearch mid hi
                         | otherwise        = binarySearch lo mid
        where mid = (lo + hi) `div` 2
  print $ binarySearch 1 1000000001
