#define _USE_MATH_DEFINES #include #define int long long #define rep(i,n) for(int i=0;i=0;i--) #define vi vector #define vvi vector #define pb push_back #define pi pair #define vp vector> #define mp make_pair #define all(v) (v).begin(),(v).end() #define fi first #define se second #define MEMSET(a) memset(a,0,sizeof(a)) #define inf (1ll<<60) #define Yes(f) cout<<(f?"Yes":"No")<()) #define VI(a,n) vi a(n); rep(i,n)cin>>a[i]; using namespace std; const int mod=1e9+7; void run(); void init() { ios::sync_with_stdio(false); cin.tie(0); cout<>s; int ans=0; int sign=1; bool turn=false; rep(i,s.length()){ if(s[i]=='+')sign=1; else if(s[i]=='-')sign=-1; else if(s[i]=='(')turn=(sign==-1),sign=1; else if(s[i]==')')turn=false,sign=1; else if(turn)ans-=(s[i]-'0')*sign; else ans+=(s[i]-'0')*sign; } cout<