import Control.Monad

main :: IO ()
main = do
  n <- readLn
  xs <- replicateM n readLn :: IO [Integer]
  print $ sum $ solve xs 0

solve :: [Integer] -> Integer -> [Integer]
solve [] _ = []
solve (x:xs) u
  | u+1 >= x = solve xs $ if u+1 == x then u+1 else u
  | otherwise = (x-1)`div`(u+1) : solve xs (max 1 u)
