import Data.Maybe
import Text.Printf
import qualified Data.ByteString.Char8 as C

parseInt :: C.ByteString -> Int
parseInt = fst . fromJust . C.readInt

readInts :: IO [Int]
readInts = map parseInt . C.words <$> C.getLine

main :: IO ()
main = do
  [n, k] <- readInts
  as <- readInts
  let calc m = sum $ map (\l -> (l - 1) `div` m) as
      work l r
        | l >= r = l
        | otherwise =
            let m = (l + r) `div` 2
            in if calc m <= k
                 then work l m
                 else work (m + 1) r
  printf "%d\n" $ work 1 1000000000
