include[HTML_REMOVED]
include[HTML_REMOVED]
include[HTML_REMOVED]
include[HTML_REMOVED]
using namespace std;
stack[HTML_REMOVED] num;
stack [HTML_REMOVED]op;
void eval()
{
auto b=num.top();num.pop();
auto a=num.top();num.pop();
auto c=op.top();op.pop();
int d;
if(c==’-‘) d=a-b;
else if(c==’+’)d=a+b;
else if(c==’‘)d=ab;
else
d=a/b;
num.push(d);
}
int main()
{
string y;
cin>>y;
unordered_map[HTML_REMOVED]kr{{‘+’,1},{‘-‘,1},{‘/’,2},{‘*’,2}};
for(int p=0;p<y.size();p)
{
char k=y[p];
if(isdigit(k))
{
int x=0,j=p;
while(j<y.size()&&isdigit(y[j]))
x=x*10+y[j]-‘0’;
p=j-1;
num.push(x);
}
else if(k=='(') op.push('(');
else if(k==')')
{
while(op.top()!='(') eval();
op.pop();
}
else
{
while(op.size()&&kr[op.top()]>=kr[k])
eval();
op.push(k);
}
}
while(op.size()) eval();
cout<<num.top();
return 0;
}