n,*a=list(map(int,open(0)))

b,c=1,0

for i in a:

  if i>b:

    c+=(i-1)//b

    b+=b<2

  elif i==b:

    b+=1

print(c)
n,*a=list(map(int,open(0)))

b,c=1,0

for i in a:

  c+=~-i//b*(i>b)

  b+=b<2or i==b

print(c)
n, *a = list(map(int, open(0)))
b, c = 1, 0
for i in a:
    if i > b:
        c += (i - 1) // b
        b += b < 2
    elif i == b:
        b += 1
print(c)

n, *a = list(map(int, open(0)))
b, c = 1, 0
for i in a:
    c += ~-i // b * (i > b)
    b += b < 2 or i == b
print(c)

-    if i > b: -        c += (i - 1) // b -        b += b < 2 -    elif i == b: -        b += 1 +    c += ~-i // b * (i > b) +    b += b < 2 or i == b