import qualified Data.ByteString.Char8 as BS
import Data.Maybe
import Control.Monad

main :: IO ()
main = do
  n <- readLn
  a <- replicateM n (fst . fromJust . BS.readInt <$> BS.getLine)
  print $ (head a - 1) + solve 1 (tail a)

solve :: Int -> [Int] -> Int
solve _ [] = 0
solve m (n:ns)
  | n == m+1           = solve n ns
  | n `mod` (m+1) == 0 = n `div` (m+1) - 1 + solve m ns
  | otherwise          = n `div` (m+1) + solve m ns
