from functools import reduce

n = (int)(eval(input()))

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





def calcMod(a, m):

  return sum([m % v for v in a])





def mul(a, b):

  return a*b





print((calcMod(a, reduce(mul, a)-1)))

from functools import reduce

n = (int)(eval(input()))

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





def calcMod(a, m):

  return sum([m % v for v in a])





def mul(a, b):

  return a*b





#print(calcMod(a, reduce(mul, a)-1))

print((sum(a)-n))

from functools import reduce

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


def calcMod(a, m):
    return sum([m % v for v in a])


def mul(a, b):
    return a * b


print((calcMod(a, reduce(mul, a) - 1)))

from functools import reduce

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


def calcMod(a, m):
    return sum([m % v for v in a])


def mul(a, b):
    return a * b


# print(calcMod(a, reduce(mul, a)-1))
print((sum(a) - n))

-print((calcMod(a, reduce(mul, a) - 1))) +# print(calcMod(a, reduce(mul, a)-1)) +print((sum(a) - n))