Buggy python submission (verdict: Runtime Error):
import fraction
from functools import reduce


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

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


N = int(input())
A = list(map(int, input().split()))
L = lcm(A) - 1

result = 0

for a in A:
    result += (L % a)

print(result)


Fixed submission:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# 文字列入力
'''
S = input()
A, B = input().split()
'''

# 文字列分解（['A', 'B', 'C']）
'''
S = list(input())
'''

# 整数入力
'''
X, Y, Z = map(int, input().split())
X, Y, Z = list(map(int, input().split()))
'''

# リストのユニーク化（順破壊）
'''
L = ['a', 'a', 'b']
L = list(set(L))
'''

# 固定長リスト最速初期化
'''
L = [None] * N
'''

# 二進数でフラグパターンを全種作成
'''
import numpy as np

N = 3
f = []

for i in range(0, 2**N):
    string = str(bin(i))[2:]
    f.append(['0'] * (N - len(string)) + list(string))

F = np.array(f)
F = (F == '1')
'''

import fractions
from functools import reduce


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

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


N = int(input())
A = list(map(int, input().split()))
L = lcm(A) - 1

result = 0

for a in A:
    result += (L % a)

print(result)

Buggy python submission (verdict: Runtime Error):
import math
from functools import reduce


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

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


N = int(input())
A = list(map(int, input().split()))
L = lcm(A) - 1

result = 0

for a in A:
    result += (L % a)

print(result)


Fixed submission:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# 文字列入力
'''
S = input()
A, B = input().split()
'''

# 文字列分解（['A', 'B', 'C']）
'''
S = list(input())
'''

# 整数入力
'''
X, Y, Z = map(int, input().split())
X, Y, Z = list(map(int, input().split()))
'''

# リストのユニーク化（順破壊）
'''
L = ['a', 'a', 'b']
L = list(set(L))
'''

# 固定長リスト最速初期化
'''
L = [None] * N
'''

# 二進数でフラグパターンを全種作成
'''
import numpy as np

N = 3
f = []

for i in range(0, 2**N):
    string = str(bin(i))[2:]
    f.append(['0'] * (N - len(string)) + list(string))

F = np.array(f)
F = (F == '1')
'''

import fractions
from functools import reduce


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

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


N = int(input())
A = list(map(int, input().split()))
L = lcm(A) - 1

result = 0

for a in A:
    result += (L % a)

print(result)

Buggy python submission (verdict: Runtime Error):
import math
from functools import reduce


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

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


N = int(input())
A = list(map(int, input().split()))
L = lcm(A) - 1

result = 0

for a in A:
    result += (L % a)

print(result)


Fixed submission:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# 文字列入力
'''
S = input()
A, B = input().split()
'''

# 文字列分解（['A', 'B', 'C']）
'''
S = list(input())
'''

# 整数入力
'''
X, Y, Z = map(int, input().split())
X, Y, Z = list(map(int, input().split()))
'''

# リストのユニーク化（順破壊）
'''
L = ['a', 'a', 'b']
L = list(set(L))
'''

# 固定長リスト最速初期化
'''
L = [None] * N
'''

# 二進数でフラグパターンを全種作成
'''
import numpy as np

N = 3
f = []

for i in range(0, 2**N):
    string = str(bin(i))[2:]
    f.append(['0'] * (N - len(string)) + list(string))

F = np.array(f)
F = (F == '1')
'''

import fractions
from functools import reduce


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

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


N = int(input())
A = list(map(int, input().split()))
L = lcm(A) - 1

result = 0

for a in A:
    result += (L % a)

print(result)