import sys

input = sys.stdin.readline



N = int(eval(input()))

A = [int(eval(input())) for _ in range(N)]

ans = A[0] - 1

P = 2

for i in range(1, N):

    if A[i] == P:

        P += 1

        continue

    ans += (A[i]-  1) // P

print(ans)
import sys

input = sys.stdin.readline



N = int(eval(input()))

A = [int(eval(input())) for _ in range(N)]

cur = 1

ans = A[0] - 1

for a in A[1:]:

    if a == cur + 1:

        cur += 1

    elif a % (cur + 1) == 0:

        ans += a // (cur + 1) - 1

    else:

        ans += a // (cur + 1)

print(ans)
import sys

input = sys.stdin.readline
N = int(eval(input()))
A = [int(eval(input())) for _ in range(N)]
ans = A[0] - 1
P = 2
for i in range(1, N):
    if A[i] == P:
        P += 1
        continue
    ans += (A[i] - 1) // P
print(ans)

import sys

input = sys.stdin.readline
N = int(eval(input()))
A = [int(eval(input())) for _ in range(N)]
cur = 1
ans = A[0] - 1
for a in A[1:]:
    if a == cur + 1:
        cur += 1
    elif a % (cur + 1) == 0:
        ans += a // (cur + 1) - 1
    else:
        ans += a // (cur + 1)
print(ans)

+cur = 1 -P = 2 -for i in range(1, N): -    if A[i] == P: -        P += 1 -        continue -    ans += (A[i] - 1) // P +for a in A[1:]: +    if a == cur + 1: +        cur += 1 +    elif a % (cur + 1) == 0: +        ans += a // (cur + 1) - 1 +    else: +        ans += a // (cur + 1)