import numpy as np

n = int(eval(input()))

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

f = 0

ans = np.cumsum(a) - n

print((ans[-1]))

n = int(eval(input()))

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

f = 0

ans = 0

for i in range(n):

    ans += a[i]

print((ans - n))

import numpy as np

n = int(eval(input()))
a = list(map(int, input().split()))
f = 0
ans = np.cumsum(a) - n
print((ans[-1]))

n = int(eval(input()))
a = list(map(int, input().split()))
f = 0
ans = 0
for i in range(n):
    ans += a[i]
print((ans - n))

-import numpy as np - -ans = np.cumsum(a) - n -print((ans[-1])) +ans = 0 +for i in range(n): +    ans += a[i] +print((ans - n))