#include #include #include using namespace std; int main(int argc, char* argv[]) { string S; cin>>S; char ch; char op; char data1,data2; stack St; int i; for (i=0;i='0' && ch<='9')){ if (St.empty()){ St.push(ch); continue; } char op=St.top(); if (op=='+' || op=='-'){ St.pop(); data1=St.top(); St.pop(); switch(op){ case '+': St.push(data1-'0'+ch-'0'+'0'); break; case '-': St.push((data1-'0')-(ch-'0')+'0'); break; } }else{ St.push(ch); } } } while (!St.empty()){ data2=St.top(); St.pop(); if (St.empty()){ cout<