#import <stdio.h>
int main() {
    int n,m;
    int T[200] = {0};
    int P[200] = {0};
    int X[200] = {0};
    scanf("%d", &n);
    for(int i=0;i<n;i++) {
        int t;
        scanf("%d", &t);
        T[i] = t;
    }
    scanf("%d", &m);
    for(int j=0;j<m;j++) {
        int p, x;
        scanf("%d %d", &p,&x);
        P[j] = p;
        X[j] = x;
    }
    for(int j=0;j<m;j++) {
        int count = 0;
        for(int i=0;i<n;i++) {
            count += i==P[j]-1 ? X[j] : T[i];
        }
        printf("%d\n", count);
    }
}
