# -*- coding: utf-8 -*-

import sys,copy,math,heapq,itertools as it,fractions,re,bisect,collections as coll



N = int(input())

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

ans = A[0] - 1

d = 2

for i in range(1, N):

    k = (A[i] - 1)/d

    if A[i] == d:

        d += 1

    ans += k

print(ans)

N = int(input())

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

ans = A[0] - 1

d = 2

for i in range(1, N):

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

    if A[i] == d: d += 1

print(ans)

# -*- coding: utf-8 -*-
import sys, copy, math, heapq, itertools as it, fractions, re, bisect, collections as coll

N = int(input())
A = [int(input()) for i in range(N)]
ans = A[0] - 1
d = 2
for i in range(1, N):
    k = (A[i] - 1) / d
    if A[i] == d:
        d += 1
    ans += k
print(ans)

N = int(input())
A = [int(input()) for i in range(N)]
ans = A[0] - 1
d = 2
for i in range(1, N):
    ans += (A[i] - 1) / d
    if A[i] == d:
        d += 1
print(ans)

-# -*- coding: utf-8 -*- -import sys, copy, math, heapq, itertools as it, fractions, re, bisect, collections as coll - -    k = (A[i] - 1) / d +    ans += (A[i] - 1) / d -    ans += k