module Main where
import Control.Monad
import Control.Applicative
import Data.Maybe
import Data.List
import qualified Text.Printf
import qualified Data.ByteString.Char8 as BC
import qualified Data.ByteString as BC

------------------------------------------

main :: IO ()
main = do
  n <- readInt
  xs <- replicateM n readInt
  print $ solve xs

solve :: [Int] -> Int
solve xs = go 0 1 xs
  where go acc _   [] = acc
        go acc dec (y:ys)
          | y == 1 = go (acc + (y-1)) 2 ys
          | y == dec = go acc (dec + 1) ys
          | otherwise = go (acc + ((y-1) `div` dec)) dec ys

------------------------------------------

{- Int input -}

parseInt :: BC.ByteString -> Int
parseInt = fst . fromJust . BC.readInt

parseInts :: BC.ByteString -> [Int]
parseInts = map parseInt <$> BC.words

readInt :: IO Int
readInt = parseInt <$> BC.getLine

readInts :: IO [Int]
readInts = parseInts <$> BC.getLine

{- Double Formatting -}

doubleFormat :: Double -> String
doubleFormat = Text.Printf.printf "%.12f"
