#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
// 大數加法
string addBigNumbers(string num1, string num2) {
string result = "";
int carry = 0;
// 讓兩個字串長度相同
while (num1.size() < num2.size()) num1 = "0" + num1;
while (num2.size() < num1.size()) num2 = "0" + num2;
// 從尾部開始逐位相加
for (int i = num1.size() - 1; i >= 0; --i) {
int sum = (num1[i] - '0') + (num2[i] - '0') + carry;
carry = sum / 10;
result += (sum % 10) + '0';
}
// 處理進位
if (carry) result += carry + '0';
reverse(result.begin(), result.end());
return result;
}
// 大數減法 (假設 num1 >= num2)
string subtractBigNumbers(string num1, string num2) {
string result = "";
int borrow = 0;
// 讓兩個字串長度相同
while (num2.size() < num1.size()) num2 = "0" + num2;
// 從尾部開始逐位相減
for (int i = num1.size() - 1; i >= 0; --i) {
int diff = (num1[i] - '0') - (num2[i] - '0') - borrow;
if (diff < 0) {
diff += 10;
borrow = 1;
} else {
borrow = 0;
}
result += diff + '0';
}
// 去掉前導零
while (result.size() > 1 && result.back() == '0') {
result.pop_back();
}
reverse(result.begin(), result.end());
return result;
}
int main() {
string num1, num2, op;
// 假設輸入格式固定正確
cin >> num1 >> op >> num2;
if (op == "+") {
cout << addBigNumbers(num1, num2) << endl;
} else if (op == "-") {
cout << subtractBigNumbers(num1, num2) << endl; // 假設 num1 >= num2
}
return 0;
}