N = int(eval(input()))

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



ans = 0

for i in range(N):

  ans += A[i] - 1

  

print(ans)
import math

N = int(eval(input()))

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



A = list([int(math.copysign(x-1, x)) for x in A])



print((sum(A)))
N = int(eval(input()))
A = list(map(int, input().split()))
ans = 0
for i in range(N):
    ans += A[i] - 1
print(ans)

import math

N = int(eval(input()))
A = list(map(int, input().split()))
A = list([int(math.copysign(x - 1, x)) for x in A])
print((sum(A)))

+import math + -ans = 0 -for i in range(N): -    ans += A[i] - 1 -print(ans) +A = list([int(math.copysign(x - 1, x)) for x in A]) +print((sum(A)))