import Control.Monad
 
main :: IO ()
main = do
  n <- readLn
  xs <- replicateM n readLn :: IO [Int]
  print $ greedyCustormors xs 1

greedyCustormors :: [Int] -> Int -> Int
greedyCustormors [] _ = 0
greedyCustormors (x:xs) k | k==1  = (x-1) + greedyCustormors xs (k+1)
                          | k==x  = greedyCustormors xs (k+1)
                          | k>x  = greedyCustormors xs k
                          | otherwise = if ((x`mod`k) == 0) then x`div`k-1 + greedyCustormors xs k else (x`div`k) + greedyCustormors xs k
