N = int(eval(input()))

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

M = int(eval(input()))

p = []

x = []

ans = []

for i in range(M):

    p, x = list(map(int, input().split()))

    ans.append(sum(T[:p-1])+x+sum(T[p:]))



for _ in ans:

    print(_)
N = int(eval(input()))

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

M = int(eval(input()))

P, X, ans = [0]*M, [0]*M, []

base = sum(T)



for i in range(M):

    P, X = list(map(int, input().split()))

    ans.append(base-T[P-1]+X)



for i in ans:

    print(i)
N = int(eval(input()))
T = list(map(int, input().split()))
M = int(eval(input()))
p = []
x = []
ans = []
for i in range(M):
    p, x = list(map(int, input().split()))
    ans.append(sum(T[: p - 1]) + x + sum(T[p:]))
for _ in ans:
    print(_)

N = int(eval(input()))
T = list(map(int, input().split()))
M = int(eval(input()))
P, X, ans = [0] * M, [0] * M, []
base = sum(T)
for i in range(M):
    P, X = list(map(int, input().split()))
    ans.append(base - T[P - 1] + X)
for i in ans:
    print(i)

-p = [] -x = [] -ans = [] +P, X, ans = [0] * M, [0] * M, [] +base = sum(T) -    p, x = list(map(int, input().split())) -    ans.append(sum(T[: p - 1]) + x + sum(T[p:])) -for _ in ans: -    print(_) +    P, X = list(map(int, input().split())) +    ans.append(base - T[P - 1] + X) +for i in ans: +    print(i)