import numpy as np



N = int(eval(input()))

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



print((np.sum(a - 1)))
N = int(eval(input()))

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

 

print((sum(a) - N))
import numpy as np

N = int(eval(input()))
a = np.array(list(map(int, input().split())))
print((np.sum(a - 1)))

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

-import numpy as np - -a = np.array(list(map(int, input().split()))) -print((np.sum(a - 1))) +a = list(map(int, input().split())) +print((sum(a) - N))