CodeEff/ECCO huggingface dataset:
# Original solution
A, B = input().split()
print((B+A))

# Optimized solution
S, T = input().split()
print((T+S))
# Original solution
import sys
#import numpy as np
stdin = sys.stdin

ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split())) # applies to numbers only
rs = lambda: stdin.readline().rstrip()  # ignore trailing spaces

S, T = input().split()
print((T+S))


# Optimized solution
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

S, T = sr().split()
answer = T + S
print(answer)
# 39
# Original solution
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    s, t = list(map(str, readline().rstrip().decode('utf-8').split()))
    print((t + s))


if __name__ == '__main__':
    solve()


# Optimized solution
import sys


def solve():
    input = sys.stdin.readline
    mod = 10 ** 9 + 7
    s, t = list(map(str, str(input().rstrip('\n')).split()))
    print((t + s))


if __name__ == '__main__':
    solve()
# Original solution
b, c = list(map(str, input().split()))

print((c+b))

# Optimized solution
s,t=list(map(str,input().split()))

print((t+s))
# Original solution
a, b = list(map(str, input().split()))
print(('{}{}'.format(b, a)))

# Optimized solution
str_l = list(map(str, input().split()))
print((''.join(list(reversed(str_l)))))
# Original solution
eval(input());print((sum([i-1 for i in list(map(int,input().split()))])))

# Optimized solution
print((-int(eval(input()))+sum(map(int,input().split()))))
# Original solution
n = int(eval(input()))
a = list(map(int, input().split()))
print((sum(a)-len(a)))

# Optimized solution
n = int(eval(input()))
a = list(map(int, input().split()))
print((sum(a)-n))
# Original solution
N = int(eval(input()))
L = list([x - 1 for x in list(map(int,input().split()))])
print((sum(L)))

# Optimized solution
N = eval(input())
print((sum(list([x - 1 for x in list(map(int,input().split()))]))))
# Original solution
import math


class Sieve:
    """Sieve of Eratosthenes.

    List primes up to n.
    """

    def __init__(self, n):
        self.__prime = []
        self.__is_prime = [i >= 2 for i in range(n + 1)]

        for i in range(2, int(math.sqrt(n)) + 1):
            if self.__is_prime[i]:
                for j in range(i * i, n + 1, i):
                    self.__is_prime[j] = False

        for i in range(2, n + 1):
            if self.__is_prime[i]:
                self.__prime.append(i)

    def prime(self):
        return self.__prime

    def is_prime(self, n):
        return self.__is_prime[n]


if __name__ == '__main__':
    N = int(eval(input()))  # 2 <= N <= 3000
    a = list(map(int, input().split()))  # 2 <= ai <= 100000
    b = [ai for ai in a]

    p = Sieve(100000).prime()  # len = 9952

    prime_to_power = [0 for _ in range(p[-1] + 1)]
    for i in range(len(a)):
        for prime in p:
            power = 0
            while b[i] % prime == 0:
                b[i] /= prime
                power += 1
            prime_to_power[prime] = max(prime_to_power[prime], power)
            if b[i] == 1:
                break

    lcm = 1
    for i in range(len(prime_to_power)):
        lcm *= i ** prime_to_power[i]
    m = lcm - 1
    ans = 0
    for ai in a:
        ans += m % ai
    print(ans)


# Optimized solution
import math


class Sieve:
    """Sieve of Eratosthenes.

    List primes up to n.
    """

    def __init__(self, n):
        self.__prime = []
        self.__is_prime = [i >= 2 for i in range(n + 1)]

        for i in range(2, int(math.sqrt(n)) + 1):
            if self.__is_prime[i]:
                for j in range(i * i, n + 1, i):
                    self.__is_prime[j] = False

        for i in range(2, n + 1):
            if self.__is_prime[i]:
                self.__prime.append(i)

    def prime(self):
        return self.__prime

    def is_prime(self, n):
        return self.__is_prime[n]


def bf(N, a):
    p = Sieve(max(a) + 1).prime()  # len <= 9952

    prime_to_power = {}
    for prime in p:
        prime_to_power[prime] = 0

    for i in range(N):
        ai = a[i]
        for prime in p:
            power = 0
            while ai % prime == 0:
                ai //= prime
                power += 1
            prime_to_power[prime] = max(prime_to_power[prime], power)
    lcm = 1
    for prime in prime_to_power:
        lcm *= prime ** prime_to_power[prime]
    m = lcm - 1
    ans = 0
    for ai in a:
        ans += m % ai
    return ans


def al(N, a):
    return sum(a) - len(a)


if __name__ == '__main__':
    N = int(eval(input()))  # 2 <= N <= 3000
    a = list(map(int, input().split()))  # 2 <= ai <= 100000
    # print(bf(N, a))
    print((al(N, a)))
# Original solution
def main():
    n, *a = list(map(int, open(0).read().split()))
    ans = sum(a) - n
    print(ans)

if __name__ == '__main__':
    main()


# Optimized solution
print((-int(eval(input()))+sum(map(int, input().split()))))
# Original solution
# 最大公約数を求める関数
def gcd(a,b):
    rem = a % b
    while rem != 0:
        a = b
        b = rem
        rem = a % b
    return b

# 最小公倍数を求める関数
def lcm(a,b):
    return (a*b)/gcd(a,b)

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


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

res = int(sum([(m-1) % e for e in a]))
print(res)

# Optimized solution
n = int(eval(input()))
res = sum(list(map(int, input().split()))) - n
print(res)
# Original solution
n = int(eval(input()))
a = [ int(x) for x in input().split(" ") ]

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


# Optimized solution
N = int(eval(input()))
a = list(map(int, input().split()))

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

print(ans)
# Original solution
#                         author:  kagemeka 
#                         created: 2019-11-08 15:54:47(JST)
### modules
## from standard library
import sys
# import collections
# import math
# import string
# import bisect
# import re
# import itertools
# import statistics
import functools
# import operator
## from external libraries
# import scipy.special   # if use comb function on AtCoder, 
# import scipy.misc      # select scipy.misc.comb (old version) 
# import numpy as np

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

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


def main():
    n, *a = (int(x) for x in sys.stdin.read().split())

    m = functools.reduce(lcm, a)
    f = sum([(m - 1) % a[i] for i in range(n)])
    print(f)

if __name__ == "__main__":
    # execute only if run as a script
    main()


# Optimized solution
#                         author:  kagemeka 
#                         created: 2019-11-08 15:54:47(JST)
### modules
## from standard library
import sys
# import collections
# import math
# import string
# import bisect
# import re
# import itertools
# import statistics
# import functools
# import operator
## from external libraries
# import scipy.special   # if use comb function on AtCoder, 
# import scipy.misc      # select scipy.misc.comb (old version) 
# import numpy as np


def main():
    n, *a = (int(x) for x in sys.stdin.read().split())
    # editorial より
    f = sum(a) - n
    print(f)

if __name__ == "__main__":
    # execute only if run as a script
    main()
# Original solution
n=int(eval(input()))
a=[int(x) for x in input().split()]
print((sum(a)-n))

# Optimized solution
def main():
    N = int(eval(input()))
    A = list(map(int,input().split()))
    print((sum(A) - N))

if __name__ == "__main__":
    main()
# Original solution
N = int(eval(input()))
a =list(map(int, input().split()))
ans = 0
a_all = 1
for i in range(N):
  a_all = a_all*a[i]

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

# Optimized solution
N = int(eval(input()))
a = [int(i) for i in input().split()]

ans = sum(a) - N
print(ans)
# Original solution
N=int(eval(input()))
A=list([int(x)-1 for x in input().split()])
print((sum(A)))

# Optimized solution
N=int(eval(input()))
A=list(map(int,input().split()))
print((sum(A)-N))
# Original solution
N = int(eval(input()))
A = list([int(x) - 1 for x in input().split()])

print((sum(A)))


# Optimized solution
N = int(eval(input()))
A = list(map(int, input().split()))
ans = sum(A) - N
print(ans)
# Original solution
N = int(eval(input()))
a = list(map(int, input().split()))
print((sum([i-1 for i in a])))


# Optimized solution
N = int(eval(input()))
a = list(map(int, input().split()))
print((sum(a)-N))
# Original solution
def gcd(x,y):
  r=x%y
  return gcd(y,r) if r else y

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

n=int(eval(input()))
A=list(map(int,input().split()))
k=1
for i in A:
  k=lcm(k,i)

def f(n):
  return sum(list([n%x for x in A]))
print((f(k-1)))

# Optimized solution
n=int(eval(input()))
A=list(map(int,input().split()))
print((sum(A)-n))
# Original solution
from functools import reduce
n = (int)(eval(input()))
a = (list)(list(map(int, input().split())))


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


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


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


def lcm_list(l):
  g = reduce(lcm, l)
  return g


print((calcMod(a, (int)(lcm_list(a)-1))))


# Optimized solution
from functools import reduce
n = (int)(eval(input()))
a = (list)(list(map(int, input().split())))


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


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


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


def lcm_list(l):
  g = reduce(lcm, l)
  return g


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


#print(calcMod(a, (int)(lcm_list(a)-1)))
print((calcMod(a, reduce(mul, a)-1)))
# Original solution
from functools import reduce
n = (int)(eval(input()))
a = (list)(list(map(int, input().split())))


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


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


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


def lcm_list(l):
  g = reduce(lcm, l)
  return g


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


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


# Optimized solution
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)))
# Original solution
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)))


# Optimized solution
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))
# Original solution
import sys
input = sys.stdin.readline
N = int(eval(input()))
ans = 0
for a in map(int, input().split()):
    ans += a
print((ans - N))

# Optimized solution
N = int(eval(input()))
print((sum(map(int, input().split())) - N))
# Original solution
N = int(eval(input()))
A = [int(zz) for zz in input().split()]

print((sum(A)-N))


# Optimized solution
N = int(eval(input()))
print((sum([int(i)-1 for i in input().split()])))
# Original solution
n = int(eval(input()))
a = list(map(int, input().split()))
print((sum(a) - n))

# Optimized solution
i = input;i();print((sum([int(x)-1 for x in i().split()])))
# Original solution
N=int(eval(input()))
a = list(map(int,input().split()))
print((sum(a)-len(a)))

# Optimized solution
N=int(eval(input()))
a = list(map(int,input().split()))
print((sum(a)-N))
# Original solution
n = int(eval(input()))
A = [int(i) for i in input().strip().split()]

print((sum(A) - n))


# Optimized solution
import sys


def input():
    return sys.stdin.readline().strip()
# sys.setrecursionlimit(100000)


def main():
    n = int(input().strip())
    A = [int(i) for i in input().split()]
    print((sum(A) - n))

    return


if __name__ == "__main__":
    main()
# Original solution
# モジュールのインポート
import fractions

# 標準入力を取得
N = int(eval(input()))
a = list(map(int, input().split()))

# 求解処理
ans = sum(a) - N

# 結果出力
print(ans)


# Optimized solution
# -*- coding: utf-8 -*-

def get_input() -> tuple:
    """
    標準入力を取得する.

    Returns:\n
        tuple: 標準入力
    """
    N = int(eval(input()))
    a = list(map(int, input().split()))

    return N, a


def main(N: int, a: list) -> None:
    """
    メイン処理.

    Args:\n
        N (int): 正整数の数(2 <= N <= 3000)
        a (list): 正整数(2 <= a_i <= 10^5)
    """
    # 求解処理
    ans = sum(a) - N

    # 結果出力
    print(ans)


if __name__ == "__main__":
    # 標準入力を取得
    N, a = get_input()

    # メイン処理
    main(N, a)
# Original solution
N = eval(input())
a = list(map(int, input().split()))

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

summ2 = 0
for i in a:
    summ2 += (summ-1)% i

print(summ2)

# Optimized solution
N = eval(input())
a = list(map(int, input().split()))

summ2 = sum(a) - int(N)

print(summ2)
# Original solution
#ABC 103
#最小公倍数
from functools import reduce

#a,bの最大公約数
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

#a,bの最小公倍数
def lcm_base(a, b):
    return a * b // gcd (a, b)
def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)
N=int(eval(input()))
A = [int(j) for j in input().split()]

ans = 0
for a in A:
    ans+=(lcm(*A)-1)%a
print(ans)

# Optimized solution
#ABC 103
import functools
import operator

N=int(eval(input()))
A = [int(j) for j in input().split()]
result = functools.reduce(operator.mul, A)
ans = 0
for a in A:
    ans+=(result-1)%a
print(ans)
# Original solution
import sys
import itertools
input = sys.stdin.readline
N = int(eval(input()))
li = [int(i) for i in input().split()]
sum = 0
for i in range(N) :
    sum += li[i]- 1
print(sum)


# Optimized solution
#template
def inputlist(): return [int(k) for k in input().split()]
#template
N = int(eval(input()))
A = inputlist()
print((sum(A)-N))
# Original solution
from collections import defaultdict
def readInt():
  return int(eval(input()))
def readInts():
  return list(map(int, input().split()))
def readChar():
  return eval(input())
def readChars():
  return input().split()

n = readInt()
a = readInts()

ma = max(a)
ans = 0
seki = 1
for i in a:
  seki*=i

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

print(ans)

# Optimized solution
from collections import defaultdict
def readInt():
  return int(eval(input()))
def readInts():
  return list(map(int, input().split()))
def readChar():
  return eval(input())
def readChars():
  return input().split()

n = readInt()
a = readInts()

ans = 0
for i in a:
  ans+=i-1
print(ans)
# Original solution
n = int(eval(input()))
a = list(map(int, input().split()))

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

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

print(ans)

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

print((sum(a) - len(a)))
# Original solution
n = int(eval(input()))
a = list(map(int, input().split()))

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

# Optimized solution
n = int(eval(input()))
a = list(map(int, input().split()))
print((sum([x - 1 for x in a])))
# Original solution
# -*- coding: utf-8 -*-

from functools import reduce

N = int(eval(input()))
aN = list(map(int, input().split()))

def gcd(a, b):
    while b > 0:
        a, b = b, a%b
    return a
def lcm_base(x, y):
    return (x * y) // gcd(x, y)
def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

def f(num, aN):
    sum1 = 0
    for i in range(len(aN)):
        sum1 += num % aN[i]
    return sum1

# リストの最小公倍数-1を関数fの引数にする
lcm = lcm_list(aN)
print((f(lcm-1, aN)))

# Optimized solution
# -*- coding: utf-8 -*-

N = int(eval(input()))
aN = list(map(int, input().split()))

print((sum(aN)-N))
# Original solution
eval(input())
numbers = tuple(map(int, input().split(' ')))
print((sum([n - 1 for n in numbers])))


# Optimized solution
N = int(eval(input()))
print((sum(tuple(map(int, input().split(' ')))) - N))
# Original solution
n=int(eval(input()))
a=list(map(int,input().split()))
c=0
for i in range(n):
    c+=a[i]-1
print(c)

# Optimized solution
n=eval(input())
print((sum([i-1 for i in list(map(int,input().split()))])))
# Original solution
import math

n = eval(input())
a = input().split()
N = int(n)

ans_list = []
ann = []
ana = 1
for j in range(N):
    ana = ana * int(a[j])
ana = ana -1
for i in range(N):

    ans = 0
    for k in range(i+1):
        ans += int(ana % int(a[k]))
    ans_list.append(ans)

ans_list.sort()
ans_list.reverse()
print((str(ans_list[0])))







# Optimized solution
import math

n = eval(input())
a = input().split()
N = int(n)

ans_list = []
ann = []
ana = 1
for j in range(N):
    ana = ana * int(a[j])
ana = ana -1
ans = 0
for k in range(N):
    ans += int(ana % int(a[k]))
ans_list.append(ans)

ans_list.sort()
ans_list.reverse()
print((str(ans_list[0])))
# Original solution
n = int(eval(input()))
a = list(map(int, input().split()))
print((sum(a)-len(a)))

# Optimized solution
N = int(eval(input()))
a = list(map(int, input().split()))

print((sum(a)-N))
# Original solution
def gcd(a, b):
    if a < b:
        a, b = b, a
    if b == 0:
        return a
    c = a % b
    return gcd(b, c)

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

N = int(eval(input()))
A = []
s = input().split(" ")
for i in range(N):
    A.append(int(s[i]))

tmp=lcm(A[0],A[1]);
i = 2
while  i < N:
    tmp = lcm(tmp, A[i]);
    i += 1

# print(tmp)

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

# Optimized solution
N = int(eval(input()))
print((sum(list(map(int, input().split(" "))))-N))
# Original solution
N = int(eval(input()))
A = list(map(int,input().split()))

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

# Optimized solution
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)))
# Original solution
n = int(eval(input()))
a = list(map(int, input().split()))

print((sum(a)-n))

# Optimized solution
n = int(eval(input()))
a = list(map(int, input().split()))
a = list([x-1 for x in a])

print((sum(a)))
# Original solution
import typing
n = int(eval(input()))
a = list(map(int, input().split()))

def gcd(x : int, y : int):
    x, y = min(x, y), max(x, y)
    while True:
        mod = y % x
        if mod == 0:
            break
        y = x
        x = mod

    return x

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

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

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

def gcd(x, y):
    x, y = min(x, y), max(x, y)
    while True:
        mod = y % x
        if mod == 0:
            break
        y = x
        x = mod

    return x

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

res = 0
for i in range(n):
    res += (lcm - 1) % a[i]
print(res)
# Original solution
# -*- coding: utf-8 -*-
import sys
input = sys.stdin.readline

n = int(eval(input()))
a = list(map(int,input().split()))
#aをすべてかけて1を引いた整数をmにすればよい
print((sum(list([x-1 for x in a]))))

# Optimized solution
# -*- coding: utf-8 -*-
import sys
input = sys.stdin.readline

n = int(eval(input()))
a = list(map(int,input().split()))
#aをすべてかけて1を引いた整数をmにすればよい
print((sum(a)-len(a)))
# Original solution
#coding:utf-8

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

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

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

def func(x, A):
    ans = 0
    for y in A:
        ans += x%y
    return ans

def hoge(A):
    B = []
    for i in range(len(A)-1):
        for j in range(len(A)-i-1):
            tmp = lcm(A[i], A[i+1+j])
            if tmp not in B: B.append(tmp)
    return B

max_lcm = 0
B = []
for i in range(n-1):
    for j in range(n-i-1):
        tmp = lcm(A[i], A[i+1+j])
        if tmp not in B: B.append(tmp)

while(len(B) > 1):
    B = hoge(B)

print((func(B[0]-1, A)))


# Optimized solution
n = int(eval(input()))
A = list(map(int, input().split()))
print((sum(A) - n))
# Original solution
N = int(eval(input()))
A = list(map(int, input().split()))

def gcd(x,y):#ユークリッドの互除法
  if y > x:
    x, y = y, x
  while y != 0:
    x, y = y, x % y
    if y == 0:
      return x
    
def lcm(x,y):
  return x * y / gcd(x,y)

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

# Optimized solution
N = int(eval(input()))
A = list(map(int, input().split()))

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


# Optimized solution
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()
# Original solution
# ans

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

ans = 0

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

# Optimized solution
N = int(eval(input()))
a = list(map(int, input().split()))
print((sum(a) - N))
# Original solution
from functools import reduce

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

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

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

ans = 0
for x in a:
    ans += (reduce(lcm, a) - 1) % x

print(ans)

# Optimized solution
from functools import reduce

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

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

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

x = reduce(lcm, a) - 1
ans = 0
for i in a:
    ans += x % i
print(ans)
# Original solution
from functools import reduce

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

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

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

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

# Optimized solution
n = int(eval(input()))
a = list(map(int, input().split()))
print((sum(a)-n))
# Original solution
eval(input())
A = list(map(int, input().split()))

ans = 0
x = 1

for a in A:
    x *= a

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

print(ans)


# Optimized solution
def inpl(): return list(map(int, input().split()))
N = int(eval(input()))
A = inpl()
print((sum(A)-N))
# Original solution
input = open(0).read

N, *an = [int(i) - 1 for i in input().split()]
N += 1


def main():
    print((sum(an)))
    return


main()


# Optimized solution
def main():
    N, *a = [int(i) - 1 for i in open(0).read().split()]
    print((sum(a)))
    return


main()
# Original solution
print((-int(eval(input()))+sum(map(int,input().split()))))

# Optimized solution
eval(input());print((sum([x-1 for x in list(map(int,input().split()))])))
# Original solution
# coding: utf-8

def gcd(n1, n2):
    if n1 < n2:
        n1, n2 = n2, n1

    while n1 % n2 != 0:
        rest = n1 % n2
        n1, n2 = n2, rest

    return n2

def lcm(n1, n2):
    return n1 * n2 // gcd(n1, n2)

def getM(alist):
    nLcm = lcm(alist[0], alist[1])
    for i in range(2, len(alist)):
        nLcm = lcm(nLcm, alist[i])
    
    return nLcm-1

def f(m, alist):
    t_sum = 0
    for ai in alist:
        t_sum +=  m % ai

    return t_sum
    
if __name__ == "__main__":
    N = int(eval(input()))
    alist = [int(x) for x in input().split(" ")]
    print((f(getM(alist), alist)))
    


# Optimized solution
#coding: utf-8
if __name__ == "__main__":
    N = int(eval(input()))
    alist = [int(x)-1 for x in input().split(" ")]
    print((sum(alist)))
# Original solution
def gcd(a, b):
    if(a < b):
        a, b = b, a

    while b:
        a, b = b, a % b
    return a

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

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


# Optimized solution
n = int(eval(input()))
a = list(map(int, input().split()))
nums = a[0]
for num in a:
    if(nums % num != 0):
        nums *= num
ans = 0
nums -= 1
for i in a:
    ans += nums % i
print(ans)