#include #include using namespace std; int conv(string str){ int result, n = str.size(); if(str[0] == '+') return stoi(str.substr(1, n - 1)); if(str[0] == '-') return stoi(str.substr(1, n - 1)) * (-1); return stoi(str); } int main(){ string xx, yy, op, str; int opnum, xnum, ynum; cin >> str; for(int i = 1; i < str.size(); i++){ if(str[i] == '+' || str[i] == '-'){ opnum = i; break; } } op = str[opnum]; xx = str.substr(0, opnum); yy = str.substr(opnum + 1, str.size() - opnum - 1); xnum = conv(xx); ynum = conv(yy); if(op == "+") cout << xnum - ynum << endl; else cout << xnum + ynum << endl; }