N = int(eval(input()))

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

sum_T = sum(T)

M = int(eval(input()))

for _ in range(M):

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

    v = sum_T - T[p - 1] + x

    print(v)

import sys

input = sys.stdin.buffer.readline

N = int(eval(input()))

T = [0] + list(map(int, input().split()))

sum_T = sum(T)

M = int(eval(input()))

# print('sum_T', sum_T)

for _ in range(M):

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

    # print('p, x', p, x)

    t = sum_T - T[p] + x

    print(t)

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

import sys

input = sys.stdin.buffer.readline
N = int(eval(input()))
T = [0] + list(map(int, input().split()))
sum_T = sum(T)
M = int(eval(input()))
# print('sum_T', sum_T)
for _ in range(M):
    p, x = list(map(int, input().split()))
    # print('p, x', p, x)
    t = sum_T - T[p] + x
    print(t)

+import sys + +input = sys.stdin.buffer.readline -T = list(map(int, input().split())) +T = [0] + list(map(int, input().split())) +# print('sum_T', sum_T) -    v = sum_T - T[p - 1] + x -    print(v) +    # print('p, x', p, x) +    t = sum_T - T[p] + x +    print(t)