#include #include using namespace std; int N; main() { cin>>N; stackS; for(int i=0;i>A; if(A=="+") { int a=S.top();S.pop(); int b=S.top();S.pop(); S.push(a+b); } else if(A=="-") { int a=S.top();S.pop(); int b=S.top();S.pop(); S.push(b-a); } else { S.push(stoi(A)); } } cout<