import Data.Functor

main :: IO()
main = do
    n <- read . last . words <$> getLine
    xs <- map read. lines <$> getContents
    print $ if avg xs n > maximum xs then avg xs n else maximum xs
    
avg :: [Int] -> Int -> Int
avg xs n = ceiling $ (realToFrac $ sum xs) / fromIntegral n
