Problem:
Score : 100 points

Problem Statement

Joisino wants to evaluate the formula "A op B".
Here, A and B are integers, and the binary operator op is either + or -.
Your task is to evaluate the formula instead of her.

Constraints

1≦A,B≦10^9

op is either + or -.

Input

The input is given from Standard Input in the following format:

A op B

Output

Evaluate the formula and print the result.

Sample Input 1

1 + 2

Sample Output 1

3

Since 1 + 2 = 3, the output should be 3.

Sample Input 2

5 - 7

Sample Output 2

-2

Solution in C++14 (GCC 5.4.1) (judge verdict: Runtime Error)

#include<iostream>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<string>
#include<stack>
#include<queue>
#include<vector>
#include<algorithm>
#include <iomanip>
typedef long long int ll;
using namespace std;
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define REP(i,n) for (int i=0;i<(n);i++)
#define EREP(i,n) for (int i=1;i<=(n);i++)
#define EVEL 1
 
#ifndef EVEL
#define DEB(X) cout << #X << ":" <<X<<" " ;
#define TF(f) f ? cout<<"true  " : cout<<"false ";
#define END cout<<"\n";
#else
#define DEB(X) {X=X;}
#define TF(f) {f=f;}
#define END {}
#endif
const int MOD = 1000000007;
const ll INF = 10000000000;
#define NMAX 50
#define MAX 10
		
		ll A,B,C,N,M,ans=0,sum=0;
		ll T[100010],P[100010],X[100010];
		
		char S;
		
	
int main(){
	cin>>N;
	REP(i,N){
		cin>>T[i];
		sum+=T[i];
		}
	cin>>M;
	REP(i,M){
		cin>>P[i]>>X[i];
	}
	ans=INF;
	ll temp;
	REP(i,M){
		temp=sum;
		temp-=T[P[i]-1];
		temp+=X[i];
			cout<<temp<<endl;
		
	}
	

}