Problem:
 Score : 300 points    Problem Statement You are given N positive integers a_1, a_2, ..., a_N .  For a non-negative integer m , let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + ... + (m\ mod\ a_N) .  Here, X\ mod\ Y denotes the remainder of the division of X by Y .  Find the maximum value of f .      Constraints  All values in input are integers.  2 \leq N \leq 3000  2 \leq a_i \leq 10^5         Input Input is given from Standard Input in the following format:  N  a_1  a_2  ...  a_N       Output Print the maximum value of f .        Sample Input 1 3
3 4 6      Sample Output 1 10  f(11) = (11\ mod\ 3) + (11\ mod\ 4) + (11\ mod\ 6) = 10 is the maximum value of f .       Sample Input 2 5
7 46 11 20 11      Sample Output 2 90       Sample Input 3 7
994 518 941 851 647 2 581      Sample Output 3 4527

Solution (Python):
N = int(input())
a = list(input().split())
sum = 0
for i in range(N):
    sum+=int(a[i])-1
print(sum)

Solution (Python):
import fractions
from functools import reduce
def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)
def lcm_list(lst):
    return reduce(lcm_base, lst, 1)

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

m = lcm_list(a) - 1
ans = 0
for i in range(N):
    ans += m % a[i]
print(ans)

Solution (Python):
N=int(input())
A=list(map(int,input().split()))

print(sum(A)-N)

Solution (Python):
N = int(input())
a = list(map(int, input().split()))
print(sum(a)-N)

Solution (Python):
N = int(input())
a = [int(i) for i in input().split()]

print(sum(a) - N)

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    n = int(input().rstrip('\n'))
    a = list(map(int, input().rstrip('\n').split()))
    t = 0
    for i in range(n):
        t += (a[i] - 1)
    print(t)


if __name__ == '__main__':
    slove()

Solution (Python):
n=int(input())
A=list(map(int,input().split()))

print(sum([a-1 for a in A]))

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
print(sum(a)-n)

Solution (Python):
from fractions import gcd

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


lcm = 1
for i in range(n):
    lcm *= a[i] // gcd(lcm, a[i])

m = lcm - 1
ans = 0
for i in range(n):
    ans += m % a[i]

print(ans)

Solution (Python):
from fractions import gcd

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

def lcm(x, y):
    return (x * y) // gcd(x, y)

mod = 1
for i in range(len(A)):
    mod = lcm(mod, A[i])
mod -= 1

ans = 0
for i in range(len(A)):
    ans += mod % A[i]
print(ans)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
print(sum(a) - n)

Solution (Python):
n,*a=map(int,open(0).read().split());print(sum(a)-n)

Solution (Python):
import fractions
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)
N = int(input())
array = list(map(int, input().split()))
t = 1
for i in array:
    t = lcm(t,i)
t -= 1
ans = 0
for k in range(N):
    ans += t % array[k]
print(ans)

Solution (Python):
import fractions

def lcm(x,y):
    return (x*y) // fractions.gcd(x,y)

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


lcm_t = a[0]

for j in range(1,N):
    lcm_t = lcm(lcm_t,a[j])

lcm_t = max(1,lcm_t-1)

ans = 0

for k in a:
    ans += lcm_t % k

print(ans)

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
print(sum(a) - len(a))

Solution (Python):
import sys


N = int(input())
aaa = list(map(int, sys.stdin.readline().split()))

sum_aaa = sum(aaa)


print(sum_aaa - N)

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
print(sum(a)-n)

Solution (Python):
N = int(input())
a = list(map(int, input().split()))
print(sum(a)-len(a))

Solution (Python):

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a



def lcm(a, b):
    return a * b // gcd(a, b)


def main():
    n = int(input())
    a = list(map(int, input().split()))
    x = 1
    for i in a:
        x = lcm(x, i)
    x -= 1
    ans = 0
    for i in a:
        ans += x % i
    print(ans)


main()

Solution (Python):
n = int(input())
a = tuple(map(int, input().split()))

print(sum(aa - 1 for aa in a))

Solution (Python):

n = int(input())
l = [int(i) for i in input().split()]

l.sort()

ans = 0

for i in l:
    ans += i-1
    
print(ans)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
print(sum(a)-n)

Solution (Python):
N = int(input())
a = list(map(int, input().split()))
b = a.copy()

def gcd(a, b):
  if b > a:
    a, b = b, a
  a, b = b, a % b
  if b == 0:
    return a
  else:
    return gcd(a,b)
def mcd(a, b):
  return a * b // gcd(a, b)

m = a.pop()
while a:
  t = a.pop()
  m = mcd(m, t)

print (sum([(m-1) % i for i in b]))

Solution (Python):
n=int(input())
a_list=list(map(int,input().split()))




m=1
for a in a_list:
    m*=a
m-=1    

mod_all=0
for a in a_list:
    mod_all+=m%a
print(mod_all)

Solution (Python):
from functools import reduce
import fractions

n=int(input())
a_list=list(map(int,input().split()))


def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)


m=lcm_list(a_list)-1

mod_all=0
for a in a_list:
    mod_all+=m%a
print(mod_all)

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
print(sum(a)-n)

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

Solution (Python):
from fractions import gcd
N = int(input())
A = list(map(int,input().split()))

def lcm(a, b):
  return a * b // gcd (a, b)

x = A[0]
for i in range(1,N):
  x = lcm(x,A[i])
x -= 1
ans = 0
for i in range(N):
  ans += x % A[i]
print(ans)

Solution (Python):
n,*a=map(int,open(0).read().split())
print(sum([i-1 for i in a]))

Solution (Python):
import numpy as np
import math
import fractions
gcd = math.gcd if hasattr(math, "gcd") else fractions.gcd
lcm = lambda x, y: (x * y) // gcd(x, y)

lcm_ufunc = np.frompyfunc(lcm, 2, 1)

N = int(input())
a = np.array([int(i) for i in input().split()])
m = lcm_ufunc.reduce(a) - 1
print(np.mod(m, a).sum())

Solution (Python):
import fractions
n = int(input())
a = list(map(int, input().split()))
m = 0
ans = 0

for i in range(n):
  m = m*a[i]//fractions.gcd(m, a[i])
m -= 1

for i in range(n):
  ans += m%a[i]

print(ans)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))

ans = 0
for i in a:
    ans += i - 1
print(ans)

Solution (Python):
import fractions

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

lcm = a[0]
for i in a:
    lcm = lcm * i // fractions.gcd(lcm, i)

ans = 0
for i in a:
    ans += (lcm-1) % i
print(int(ans))

Solution (Python):
from fractions import gcd

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

lcm = a[0]
for i in a:
    lcm = lcm * i // gcd(lcm, i)
ans = 0
for i in a:
    ans += (lcm-1) % i
print(ans)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))

ans = 0
for i in a:
    ans += i - 1
print(ans)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))

print(sum(a) - n)

Solution (Python):
N = int(input())
lst = list(map(int, input().split()))

ans = 0
for i in lst:
  ans += i - 1
print(ans)

Solution (Python):
n = int(input())
li = list(map(int,input().split()))

def gcd(a,b):
    while b:
        a,b = b,a%b
    return a

def lcm(c,d):
    return c*d//gcd(c,d)
l = lcm(li[0],li[1])   
for i in range(2,len(li)):
    l = lcm(l,li[i])

ans = 0
for i in range(len(li)):
    ans += (l-1)%li[i]

print(ans)

Solution (Python):
N = int(input())
a = list(map(int, input().split()))

print(sum(a) - N)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
print(sum(A)-N)

Solution (Python):
print(-int(input())+sum(map(int,input().split())))

Solution (Python):
N = int(input())
A = list(map(int,input().split()))
cnt = 0
for i in range(len(A)):
    cnt += A[i]-1
print(cnt)

Solution (Python):
from fractions import gcd
from functools import reduce


def lcm(x, y):
    return (x * y) // gcd(x, y)


def lcm_list(nums):
    return reduce(lcm, nums, 1)


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

x = lcm_list(A) - 1
print(sum(x % a for a in A))

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

Solution (Python):
from functools import reduce

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

def f(m):
    ans = 0
    for i in range(n):
        ans += m % a[i]
    return ans

times = reduce(lambda x, y: x * y, a)
print(f(times-1))

Solution (Python):
n = int(input())
a = sorted(list(map(int, input().split())), reverse=True)


def gcd(a, b):
    r = a % b
    return b if 0 == r else gcd(b, r)


def lcm(a, b):
    return (a * b) // gcd(a, b)


def lcm_s(my_list):
    g = lcm(my_list[0], my_list[1])
    for i in range(2, len(my_list)):
        g = lcm(g, my_list[i])
    return g

def f(m, my_list):
  result = 0
  for a_i in my_list:
    result += m % a_i
  return result

print(f(lcm_s(a) - 1, a))

Solution (Python):

n = int(input())
a = list(map(int, input().split()))
count = 0
for ai in a:
    count += ai - 1
print(count)

Solution (Python):
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor
from operator import mul
from functools import reduce


INF = float('inf')
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 1000000007


n = I()
print(sum(LI()) - n)

Solution (Python):
def main():
    n = int(input())
    a = [int(i)-1 for i in input().split()]
    print(sum(a))

if __name__ == "__main__":
    main()

Solution (Python):
print(-int(input())+sum(map(int,input().split())))

Solution (Python):
N = int(input())
A = list(map(int, input().split()))

count = 0
for i in range(N):
  count += A[i] - 1
  
print(count)

Solution (Python):
N = int(input())
aList = list(map(int,input().split()))
ans = 0
for a in aList:
    ans += (a-1)
print(ans)

Solution (Python):
N = int(input())
A = [int(x) for x in input().split()]
print(sum(A)-N)

Solution (Python):
N = int(input())
a = list(map(int,input().split()))

print(sum(a)-N)

Solution (Python):
print(- int(input()) + sum(map(int, input().split())))

Solution (Python):
print(- int(input()) + sum(list(map(int, input().split()))))

Solution (Python):
n = int(input())
print(sum(list(map(int, input().split()))) -n)

Solution (Python):
print(-int(input())+sum(list(map(int,input().split()))))

Solution (Python):
n=int(input())
print(sum(list(map(int,input().split())))-n)

Solution (Python):
from functools import reduce
from fractions import gcd

N = int(input())
A = [int(a) for a in input().split()]
def lcm(a,b):
    return (a*b//gcd(a, b))
def lcmm(l):
    return reduce(lcm, l)

m = lcmm(A) - 1
print(sum([m%a for a in A]))

Solution (Python):

def main():
    
    
    N, *A = map(int, open(0).read().split())
    ans = sum(A) - N
    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
import itertools

N=int(input())
a=list(map(int,input().split()))
pa=1
for i in a:
  pa*=i
pa-=1

ans=0
for i in a:
  ans+=pa%i
print(ans)

Solution (Python):
import fractions
n = int(input())
a = list(map(int, input().split()))

LCM = a[0]
for i in range(1, n):
    LCM = LCM * a[i] // fractions.gcd(LCM, a[i])

ans = 0
for i in range(n):
        ans += (LCM - 1)%a[i]
print(ans)

Solution (Python):
from fractions import gcd
N = int(input())
a = list(map(int,input().split()))

def lcm(x,y):
  return x*y//gcd(x,y)

l = a[0]
for i in range(1,N):
  temp = lcm(l,a[i])
  l = temp

l -= 1
ans = 0
for i in range(N):
  ans += (l % a[i])
print(ans)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
ans = sum(a) - n
print(ans)

Solution (Python):

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

Solution (Python):
N=int(input())
A=[int(x) for x in input().split()]
ans=sum(A)-len(A)
print(ans)

Solution (Python):
n = int(input())
res = sum([int(i)-1 for i in input().split()])
print(res)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))

print(sum(a)-n)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in a:
  ans += i -1
print(ans)

Solution (Python):
n = int(input())
ls = list(map(int, input().split()))
print(sum(ls) - len(ls))

Solution (Python):
from fractions import gcd

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

def lcm(x, y):
    return (x * y) // gcd(x, y)

tmp = lcm(a[0], a[1])
for i in range(2, N):
    tmp = lcm(tmp, a[i])
tmp -= 1
ans = 0
for i in range(N):
    ans += tmp % a[i]

print(ans)

Solution (Python):
n = int(input())
A = list(map(int,input().split()))
print(sum(map(lambda x: x-1, A)))

Solution (Python):
from sys import stdin
import fractions
from functools import reduce

n = int(stdin.readline().rstrip())
arg = list(map(int, stdin.readline().rstrip().split()))


def lcm(*numbers):
    return reduce(lambda x, y: (x * y) // fractions.gcd(x, y), numbers, 1)


divided = lcm(*arg) - 1
res = sum(map(lambda x: divided % x, arg))
print(res)

Solution (Python):
input()
print(sum(int(tok) - 1 for tok in input().split()))

Solution (Python):
from fractions import gcd


def solve(n, ax):
    lcm = 1
    for ai in ax:
        lcm = lcm*ai//gcd(lcm, ai)
    m = lcm-1
    return sum(list(map(lambda x: m % x, ax)))


if __name__ == '__main__':
    n = int(input())
    ax = list(map(int, input().split()))
    print(solve(n, ax))

Solution (Python):
N = int(input())
a = list(map(int,input().split()))
print(sum(a)-N)

Solution (Python):
n = int(input())
a_list = list(map(int, input().split()))
ret = 0
for index in range(n):
    ret += a_list[index] -1
print(ret)

Solution (Python):
import math

n=int(input())
a=[int(i) for i in input().split()]

m=1
for i in a:
    m*=i

m= m-1
ans=0
for i in a:
    ans+=m%i
print(ans)

Solution (Python):
N, *A = map(int, open(0).read().split())
print(sum(a - 1 for a in A))

Solution (Python):
n=int(input())
a=list(map(int,input().split()))

print(sum(a)-n)

Solution (Python):
def resolve():
    n = int(input())
    aaa = list(map(int ,input().split()))
    print(sum([a-1 for a in aaa]))
resolve()

Solution (Python):
from functools import reduce
from operator import mul

n = int(input())
a = list(map(int, input().split()))
l = reduce(mul, a) - 1
ans = 0

for i in a:
  ans += l%i

print(ans)

Solution (Python):
n=int(input())
box=list(map(int,input().split()))
count=box[0]

def gcd(x,y):
    while y:
        x,y=y,x%y
    return x

for i in range(1,n):
    count=(box[i]*count)//gcd(box[i],count)

point=0
count -=1

for i in box:point +=count%i

print(point)

Solution (Python):
print(-int(input())+sum(map(int,input().split())))

Solution (Python):
n=int(input())
s=list(map(int,input().split()))
print(sum(s)-n)

Solution (Python):
N = int(input())
A = list(map(int,input().split()))

ans = 0
for i in range(N):
    ans += A[i] - 1
print(ans)

Solution (Python):
from functools import reduce
from operator import mul
n = int(input())
a = list(map(int, input().split()))

m = reduce(mul, a) - 1
ans = 0
for ai in a:
    ans += m % ai
print(ans)

Solution (Python):
n = int(input())
a = [int(x) for x in input().split()]
print(sum(a)-n)

Solution (Python):
N = int(input())
a = list(map(int, input().split()))
 
print(sum(a) - N)

Solution (Python):

from fractions import gcd
N = int(input())
A = list(map(int,input().split()))
t = 0

def lcm(x,y):
    return (x*y)//gcd(x,y)

for m in range(N):
    if m == 0:
        t = lcm(A[0],A[1])
    t = lcm(t,A[m])

t = t-1
A = [t%a for a in A]
print(sum(A))

Solution (Python):
import numpy as np

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

print(np.sum(a - 1))

Solution (Python):
from fractions import gcd
n=int(input())
A=list(map(int,input().split()))
l=A[0]
for i in range(1,n):
  l=l*A[i]//gcd(l,A[i])
print(sum(list(map(lambda x:(l-1)%x,A))))

Solution (Python):
N=int(input())
ls=[int(s) for s in input().split()]
ans=0
for x in ls:
  ans+=x-1
print(ans)

Solution (Python):
import fractions

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


lcm = a[0]
for i in range(1, N):
    lcm = lcm * a[i] // fractions.gcd(lcm, a[i])

total = 0
for i in range(N):
    total += (lcm - 1) % a[i]
print(total)

Solution (Python):
N = int(input())
a = list(map(int, input().split()))
s = 0
for i in a:
  s += (i-1)
print(s)

Solution (Python):
import fractions

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

ans = a[0]
for i in range(1,N):
    ans = ans * a[i] // fractions.gcd(ans, a[i])

cnt = 0
for i in a:
    cnt += (ans-1)%i

print(cnt)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))

ans = 0
for i in range(n):
    ans += a[i] - 1

print(ans)

Solution (Python):
import fractions
n=int(input())
a=list(map(int,input().split()))

c=1
for i in a:
    c=c*i//fractions.gcd(c,i)

ans=0
for i in a:
    ans+=(c-1)%i
print(ans)

Solution (Python):
import sys
import math
from fractions import gcd



from functools import reduce

def lcm(a, b):
    return a * b // gcd(a, b)

def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

big_prime = 1000000007

"""


 =  sys.stdin.readline().rstrip()
 =  list(sys.stdin.readline().rstrip())


 =  int(sys.stdin.readline())
 =  map(int, sys.stdin.readline().split())
 =  list(map(int, sys.stdin.readline().split()))
 =  [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""


N =  int(sys.stdin.readline())
L =  list(map(int, sys.stdin.readline().split()))

target = reduce(lcm, L) - 1

print(sum([target % l for l in L]))

Solution (Python):
N = int(input())
a = list(map(int,input().split()))
print(sum(a)-N)

Solution (Python):
from fractions import gcd

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

Solution (Python):
_ = input()
A = list(map(int, input().strip().split(' ')))
print(sum(A)-len(A))

Solution (Python):
N = int(input())
As = list(map(int, input().split()))
r = sum(As)-N
print(r)

Solution (Python):
from fractions import gcd
from functools import reduce
def lcm(x, y):
  return (x * y) // gcd(x, y)
n = int(input())
a = list(map(int, input().split()))
t = reduce(lcm, a, 1) - 1
print(sum(t % a[i] for i in range(n)))

Solution (Python):
def main():
    N = int(input())
    a = list(map(int, input().split()))
    print(sum(a) - N)

if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())
A = list(map(int, input().split()))
sum_a = sum(A)
print(sum_a - n)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
print(sum(a)-n)

Solution (Python):

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)


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


from fractions import gcd

def lcm(x, y):
    return (x * y) // gcd(x, y)

l = 1
for a in A:
    l = lcm(l, a)

l -= 1

ans = 0
for a in A:
    ans += (l % a)

print(ans)

Solution (Python):
import sys
from collections import deque
stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

n = ni()
a_li = na()
list.sort(a_li, reverse=True)
print(sum(a_li) - len(a_li))

Solution (Python):
import fractions

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

lcm = a[0]

for i in range(1, N):
    lcm = (lcm * a[i]) // fractions.gcd(lcm, a[i])

ans = 0

for i in range(N):
    ans = ans + (lcm - 1) % a[i]
print(ans)

Solution (Python):
from fractions import gcd


def lcm(a, b):
    return a * b // gcd(a, b)


N = int(input())
As = list(map(int, input().split()))
ls = [1 for i in range(N + 1)]
for i in range(N):
    ls[i + 1] = lcm(As[i], ls[i])
m = ls[-1] - 1

total = 0
for i in range(N):
    total += m % As[i]
print(total)

Solution (Python):
N = int(input())
A = list(map(int,input().split()))
ans = sum(A)-N
print(ans)

Solution (Python):
n = int(input())
an = list(map(int, input().split()))
print(sum(an)-n)

Solution (Python):
N = int(input())
a = list(map(int, input().split()))

print(sum(a) - N)

Solution (Python):
N = int(input())
A = list(map(int,input().split()))

max_f = -N
for i in range(N):
    max_f += A[i]

print(max_f)

Solution (Python):
n= int(raw_input())
print sum(list(map(int, raw_input().split()))) - n

Solution (Python):
n = int(input())
a = list(map(int, input().split()))

ans = 0
for i in range(n):
  ans += a[i] - 1
  
print(ans)

Solution (Python):
n = int(input())
print(sum(list(map(int, input().split()))) - n)

Solution (Python):
N = int(input())
ai = list(map(int, input().split()))

answer = 0
for a in ai:
    answer = answer + (a - 1)

print(answer)

Solution (Python):

import sys
import math
from collections import defaultdict


sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]


mod = 10**9 + 7


def I(): return int(input())
def II(): return map(int, input().split())
def III(): return list(map(int, input().split()))
def Line(N):
    read_all = [tuple(map(int, input().split())) for _ in range(N)]
    return map(list,zip(*read_all))



N = I()
a = III()

print(sum(a)-len(a))

Solution (Python):
print(-int(input())+sum(map(int,input().split())))

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
print(sum(a)-n)

Solution (Python):
N = int(input())
A = [int(x) for x in input().split()]
print(sum(A)-N)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))

print(sum(a) - n)

Solution (Python):
n = int(input())
s = sum(list(map(int, input().split())))

print(s - n)

Solution (Python):
import math
import sys
import queue
from collections import Counter
from itertools import accumulate
from fractions import gcd
from functools import reduce

def lcm(a, b):
    return a * b // gcd(a, b)

def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

mod = 1000000007

"""


    = sys.stdin.readline().rstrip()
    = list(sys.stdin.readline().rstrip())


    = int(sys.stdin.readline())
    = map(int, sys.stdin.readline().split())
    = list(map(int, sys.stdin.readline().split()))
    = [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""



if __name__ == "__main__":
    N = int(sys.stdin.readline())
    L = list(map(int, sys.stdin.readline().split()))

    print(sum((x - 1) for x in L))

Solution (Python):
import fractions
from functools import reduce

N = int(input())
a_list = list(map(int, input().split()))

m = reduce(lambda x, y:x*y, a_list) - 1
ans = sum([m % a for a in a_list])
print(ans)

Solution (Python):
n=int(input())
a=list(map(int,input().split()))

print(sum(a)-n)

Solution (Python):
N = int(input())
a = list(map(int, input().split()))

ans = sum(a) - N

print(ans)

Solution (Python):
def main():
    N = int(input())
    A = [int(a) for a in input().split()]
    return sum(A) - len(A)
    
if __name__ == '__main__':
    print(main())

Solution (Python):
import sys
from collections import deque
import copy

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    nums = string_to_int(inputs[0])
    count = nums[0]
    for i in range(1, len(nums)):
        count *= nums[i]
    count -= 1
    ret = 0
    for n in nums:
        ret += count % n
    return ret


def string_to_int(string):
    return list(map(int, string.split()))


if __name__ == "__main__":
    input()
    ret = solve(inputs(1))
    print(ret)

Solution (Python):
n = int(input())
A = [int(el) for el in input().split(' ')]

print(sum(A) - n)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
print(sum(a) - n)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))

print(sum(A) - N)

Solution (Python):
if __name__ == '__main__':
    n = int(input())
    a = list(map(int,input().split()))

    answer = 0
    for i in range(n):
        answer += a[i]-1
    print(answer)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))

ans = sum(a)-n
print(ans)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))

print(sum(a) - n)

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
import fractions
d=a[0]
for i in range(n-1):
	d=(d*a[i+1])//fractions.gcd(a[i+1],d)
d-=1
ans=0
for i in range(n):
	ans+=d%a[i]
print(ans)

Solution (Python):
n = int(input())
x = [int(i) for i in input().split()]
print(sum(x) - n)

Solution (Python):
import fractions
from functools import reduce


def solve():
    n = int(input())
    a = list(map(int, input().split()))
    lcm_a = lcm(*a)
    fm = sum([(lcm_a - 1) % ai for ai in a])
    return fm


def lcm_base(x, y):
    return x * y // fractions.gcd(x, y)


def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)


if __name__ == "__main__":
    print(solve())

Solution (Python):
def gcd(a, b):
    if a > b:
        a, b = b, a
    if a == 0:
        return b
    return gcd(b % a, a)


def lcm(a, b):
    return a * b // gcd(a, b)



N = int(input())
A = [int(_) for _ in input().split()]
tmp = A[0]
for a in A[1:]:
    tmp = lcm(tmp, a)
tmp-=1
ans = 0
for a in A:
    ans +=tmp % a
print(ans)

Solution (Python):
N = int(input())
A = [int(_)-1 for _ in input().split()]
print(sum(A))

Solution (Python):
N=int(input())
a=map(int,input().split())
print(sum(a)-N)

Solution (Python):
from functools import reduce

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

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

lcm = reduce(lambda x, y: (x * y) // gcd(x, y), A)

score = 0
for a in A:
    score += (lcm - 1) % a

print(score)

Solution (Python):
def main():
    N = int(input())
    A = list(map(int, input().split()))

    ans = 0
    for a in A:
        ans += a - 1

    print(ans)
main()

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
print(sum(a)-n)

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
ans = sum(a) - n
print(ans)

Solution (Python):
import os, sys, re, math

from functools import reduce
from fractions import gcd
def lcm(vals):
    return reduce((lambda x, y: (x * y) // gcd(x, y)), vals, 1)

lines = sys.stdin.readlines()

n = int(lines[0])
a = [int(k) for k in lines[1].split()]

m = lcm(a) - 1
print (sum([m % k for k in a]))

Solution (Python):
n = input()
a = [int(b) for b in input().split()]
print (sum(a) - len(a))

Solution (Python):
line = raw_input()
n = int(line)
line = raw_input()
a = [int(s) for s in line.split(' ')]
print sum(a) - n

Solution (Python):
n = int(input())
lst = list(map(int,input().split()))

ans = 0
for i in range(n):
    ans += lst[i] - 1
print(ans)

Solution (Python):
N = int(input())
nums = list(map(int, input().split(' ')))
def gcd(a, b):
   return b if a % b == 0 else gcd(b, a % b)
def lcm(a, b):
   return a * b // gcd(a, b)
lcms = nums[0]
for i in range(1, len(nums)):
    lcms = lcm(lcms, nums[i])

ans = 0
for i in range(len(nums)):
    ans += ((lcms-1) % nums[i])
print(ans)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
print(sum(a) - len(a))

Solution (Python):
n  = int(input())
as_ = list(map(int, input().split()))
print(sum(as_)-n)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))

m = 1
for i in a:
  m *= i

ans = 0
for i in a:
  ans += (m-1) % i

print(ans)

Solution (Python):
n=int(input())
a=[int(item) for item in input().split()]
print(sum([item-1 for item in a]))

Solution (Python):
import sys
input=sys.stdin.readline

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

x = 0
for i in a:
    x += i-1
print(x)

Solution (Python):
import sys
input=sys.stdin.readline

import fractions
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

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

m = a[0]
for i in a:
    m = lcm(m, i)

x = 0
for i in a:
    x += (m-1)%i

print(x)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
total = 0
for i in a:
    total += i - 1
print(total)

Solution (Python):
n = int(input())
l = list(map(int, input().split()))
sum = 0

for i in range(n):
    sum += (l[i] - 1)

print(sum)

Solution (Python):
n  = int(input())
a = list(map(int, input().split()))
print(sum(a) - n)

Solution (Python):
import itertools
import collections

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

n = getint()
a = getints()

res = sum(a) - len(a)
print(res)

Solution (Python):
N = int(input())
a_list = list(map(int,input().split()))

print(sum(a_list)- N)

Solution (Python):
N = int(input())

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

sum = 0
for i in lst:
  sum += i-1
print(sum)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))

ans = 0
for a in A :
    ans += (a - 1)

print(ans)

Solution (Python):
N=int(input())
A=list(map(int,input().split()))
total=0
for i in range(N):
    total+=A[i]
print(total-N)

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
print(sum(a)-n)

Solution (Python):
import sys
from fractions import gcd
from functools import reduce

INPUT = lambda: sys.stdin.readline().strip()
INT = lambda: int(INPUT())
LIST = lambda: list(map(int, INPUT().split()))

sys.setrecursionlimit(10 ** 9)


def lcm(*numbers):
    return reduce(lambda x, y: (x * y)//gcd(x, y), numbers, 1)


def main():
    N = INT()
    A = LIST()
    f_max = 0
    f_limit = sum(A) - N

    for m in range(lcm(*A)-1, -1, -1):
        f = sum(list(map(lambda a: m % a, A)))

        if f > f_max: f_max = f
        if f_max == f_limit: break

    print(f_max)


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
a = list(map(int,input().split()))
A = [i-1 for i in a]
print(sum(A))

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
print( sum(a) - n )

Solution (Python):
n = int(input())
a = list(map(int, input().split()))

print(sum(a)-n)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
cnt = 0
for i in a:
    cnt += i - 1
print(cnt)

Solution (Python):
import fractions

N = int(input())
nums = list(map(int, input().split()))

ans = nums[0]

def lcm(a, b):
    return a * b // fractions.gcd(a, b)

for i in range(1, N):
    ans = lcm(ans, nums[i])

total = 0

for num in nums:
    total += (ans-1) % num
print(total)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
print(sum(A)-N)

Solution (Python):
n = int(input())
a = [int(i) for i in input().split()]

print(sum(a)-n)

Solution (Python):
input()
print(sum([int(x)-1 for x in input().split(' ')]))

Solution (Python):
N = int(input())
nums = [int(x) for x in input().split()]

print(sum(nums) - N)

Solution (Python):
import numpy as np
N = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(len(a)):
  ans += a[i]
print(ans - len(a))

Solution (Python):
from functools import reduce

def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)

def lcm(a, b):
    return (a * b) // gcd(a, b)

def lcm_list(n):
    return reduce(lcm, n)


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