#include #include #define ft first #define sc second #define pt(sth) cout << sth << "\n" #define chmax(a, b) (a)=max(a, b) #define chmin(a, b) (a)=min(a, b) #define moC(a, s, b) (a)=((a)s(b)+MOD)%MOD using namespace std; typedef long long ll; typedef pair pll; static const ll INF=1e18; static const ll MAX=101010; static const ll MOD=1e9+7; /* for(i=0; i> a[i]; */ map mp; ll rec(string s) { if(s.size()==3) { ll a=s[0]-'0'; ll b=s[2]-'0'; if(s[1]=='+') return a+b; else return a-b; } ll res=0; ll r=0; for(ll i=0; i> S; stack st; for(i=0; i