-- yukicoder My Practice -- author: Leonardone @ NEETSDKASU main = print . solve . map read . tail . words =<< getContents where solve xs = let g = foldl1 gcd xs in sum $ map (`div` g) xs