import Control.Monad
import Control.Applicative

main :: IO ()
main = getLine >>= \_ -> fmap ((map read) . lines) getContents >>= \an -> print $ solve 1 an

solve :: Int -> [Int] -> Int
solve _ [] = 0
solve k (a:an)
  | k < a     = if k == 1 then (a-1) + solve (k+1) an else if r == 0 then q - 1 + solve k an else q + solve k an
  | k == a    = solve (k+1) an
  | otherwise = solve k an
  where
    r = a `mod` k
    q = a `div` k