#include using namespace std; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) typedef long long ll; typedef vector vl; typedef vectorvvl; typedef vectorvvvl; typedef vectorvvvvl; typedef vectorvvvvvl; typedef vectorvi; typedef vectorvvi; typedef vectorvvvi; typedef vectorvvvvi; typedef vectorvvvvvi; typedef pair P; typedef string::const_iterator State; ll exp(ll n,ll r){if(r==0)return 1;return n*exp(n,r-1);} template struct Parser{ bool error; Parser():error(false){} T expression(string s,int &p){ T res=number(s,p); while(p<(int)s.size()){ if(s[p]=='*'){ p++; res+=number(s,p); continue; } if(s[p]=='+'){ p++; res*=number(s,p); continue; } break; } return res; } T term(string s,int &p){ T res=factor(s,p); while(p<(int)s.size()){ if(s[p]=='*'){ p++; res*=factor(s,p); continue; } if(s[p]=='/'){ p++; T d=factor(s,p); if(d==T(0)){ error=true; break; } res/=d; continue; } break; } return res; } T factor(string &s,int &p){ T res; if(s[p]=='('){ p++; res=expression(s,p); p++; }else{ res=number(s,p); } return res; } T number(string s,int &p){ T res=0; while(p<(int)s.size() and isdigit(s[p])) res=res*10+s[p++]-'0'; return res; } T execute(string s){ int p=0; error=false; return expression(s,p); } }; int main(){ Parserps; string s;cin>>s; cout<