from math import gcd
from functools import reduce
def lcm(a,b):
    return (a*b)//gcd(a,b)

def lcm_list(numbers):
    return reduce(lcm,numbers,1)

n=int(input())
a=list(map(int,input().split()))
b=lcm_list(a)
y=0
for x in a:
    y+=x-1
print(y)