local n = io.read("*n")
local a = io.read("*n")
local ret = a - 1
local cur = 1
for i = 2, n do
  a = io.read("*n")
  if a <= cur then
    -- nothing
  elseif a == cur + 1 then
    cur = cur + 1
  else
    ret = ret + (a - 1) // (cur + 1)
  end
end
print(ret)
