n=int(eval(input()))

a=list(map(int,input().split()))

import fractions

def lcm(a,b):

    lcm=fractions.gcd(a,b)

    return lcm

m=1

for i in range(n):

    m=lcm(m,a[i])

    

print((sum(a)-n))
import math

n=int(eval(input()))

a=list(map(int,input().split()))



ans=sum(a)-n

print(ans)
n = int(eval(input()))
a = list(map(int, input().split()))
import fractions


def lcm(a, b):
    lcm = fractions.gcd(a, b)
    return lcm


m = 1
for i in range(n):
    m = lcm(m, a[i])
print((sum(a) - n))

import math

n = int(eval(input()))
a = list(map(int, input().split()))
ans = sum(a) - n
print(ans)

+import math + -import fractions - - -def lcm(a, b): -    lcm = fractions.gcd(a, b) -    return lcm - - -m = 1 -for i in range(n): -    m = lcm(m, a[i]) -print((sum(a) - n)) +ans = sum(a) - n +print(ans)