eval(input())

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



ans = 0

x = 1



for a in A:

    x *= a



for a in A:

    ans += (x-1)%a



print(ans)

def inpl(): return list(map(int, input().split()))

N = int(eval(input()))

A = inpl()

print((sum(A)-N))
eval(input())
A = list(map(int, input().split()))
ans = 0
x = 1
for a in A:
    x *= a
for a in A:
    ans += (x - 1) % a
print(ans)

def inpl():
    return list(map(int, input().split()))


N = int(eval(input()))
A = inpl()
print((sum(A) - N))

-eval(input()) -A = list(map(int, input().split())) -ans = 0 -x = 1 -for a in A: -    x *= a -for a in A: -    ans += (x - 1) % a -print(ans) +def inpl(): +    return list(map(int, input().split())) + + +N = int(eval(input())) +A = inpl() +print((sum(A) - N))