let n = Int(readLine()!)!

var a = [Int]()
for i in 0 ..< n {
    a.append(Int(readLine()!)!)
}

var count = 0
var iter = 0
var r = 1

while true {
    if iter == 0 && a[0] > 1 {
        count += a[0] - 1
        a[0] = 1
    } else {
        while a[iter] <= r + 1 {
            r = max(r, a[iter])
            iter += 1
            if a.count <= iter {
                print(count)
                exit(0)
            }
        }
        let div = a[iter] / (r + 1)
        let mod = a[iter] % (r + 1)
        if mod == 0 {
            count += div - 1
            a[iter] = 1
        } else {
            count += div
            a[iter] = mod
        }
    }
}