# coding: utf-8
import time
import re
import math

def main():
    n=int(input())
    A=list(map(int,input().split()))
    maxMod=max(A)
    for a in range(maxMod*2):
        total=0
        for b in range(n):
            mod=A[b]
            total+=a%mod
        print(total)
main()