//author:luckYrat(twitter:@luckYrat_) #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; using P = pair; const int mod = 1000000007; const int inf = (1<<30)-1; const ll linf = (1LL<<62LL)-1; const double EPS = (1e-10); #define anyfill(n,s) setw(n) << setfill(s) #define loop(s) for(int i = 0; s > i; i++) #define rep(i,q) for(int i = 0; (q) > i; i++) #define repp(i,n,q) for(int i = n; (q) > i; i++) #define dep(i,q) for(int i = (q); 0 < i; i--) #define pb push_back #define fir first #define scn second #define ednl endl #define YesNo(a) (a?"Yes":"No") #define YESNO(a) (a?"YES":"NO") #define yesno(a) (a?"yes":"no") P ar4[4] = {{0,1},{0,-1},{1,0},{-1,0}}; P ar8[8] = {{-1,-1},{-1,0},{-1,1},{0,-1},{0,1},{1,-1},{1,0},{1,1}}; char mp[1000][1000]; struct z{ int x,y,p; }; __attribute__((constructor)) void initial() { cin.tie(0); ios::sync_with_stdio(false); } int main(){ string a,b;cin>>a>>b; string c = a+b; string d = ""; string e = ""; bool f = false; bool z = false; for(int i = 0; c.size() > i; i++){ if(c[i]=='+' || c[i]=='-'){ f = true; if(c[i]=='+')z=true; }else{ if(f){ e.push_back(c[i]); }else{ d.push_back(c[i]); } } } if(d.empty()){ cout << stol(e) << endl; }else { cout << (long)stol(d)+stol(e)*(z?1:-1) << endl; } }