N = int(eval(input()))

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

T = [0] + T

M = int(eval(input()))



for _ in range(M):

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

    val = T[p]-x

    print((sum(T)-val))

import copy

N = int(eval(input()))

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

T = [0] + T

M = int(eval(input()))



for _ in range(M):

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

    tmp = copy.deepcopy(T)

    tmp[p] = x

    print((sum(tmp)))

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

import copy

N = int(eval(input()))
T = list(map(int, input().split()))
T = [0] + T
M = int(eval(input()))
for _ in range(M):
    p, x = list(map(int, input().split()))
    tmp = copy.deepcopy(T)
    tmp[p] = x
    print((sum(tmp)))

+import copy + -    val = T[p] - x -    print((sum(T) - val)) +    tmp = copy.deepcopy(T) +    tmp[p] = x +    print((sum(tmp)))