def seal():
    #print("uyk")
    z,m,j=1,0,0
    n=int(input())
    for rd in range(n):
        a=int(input())
        z=z*a
        #print("DJT")
    #print("ykfi")
    for i in range(z):
        #print(z,m,i,j,n)
        for j in range(z):
            #
            if (i-1)*(j-1)==z:
                m+=i-1
                #print("?????????????",i,j,m)
    print(m+1+z)
seal()
#eynnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn