#include <iostream>
#include <string>
using namespace std;
/* 请在这里填写答案 */
class BigInt
{
public:
friend istream& operator>>(istream&, BigInt&);
friend ostream& operator<<(ostream&, BigInt&);
friend BigInt& operator+(BigInt&, BigInt&);
private:
string val;
};
istream& operator>>(istream& in, BigInt& n)
{
in >> n.val;
return in;
}
ostream& operator<<(ostream& out, BigInt& n)
{
out << n.val;
return out;
}
void invert(string& s)
{
for(int i = 0; i < s.size() / 2; i++)
{
swap(s.at(i), s.at(s.size() - 1 - i));
}
}
BigInt& operator+(BigInt& a, BigInt& b)
{
static BigInt c;
string sa, sb, sc;
sa = a.val;
sb = b.val;
invert(sa); //反转sa
invert(sb);
int Len_sa = sa.size();
int Len_sb = sb.size();
int i = 0;
int e = 0; //e表示进位
while(i < Len_sa && i < Len_sb)
{
int x = (sa.at(i) - '0') + (sb.at(i) - '0') + e;
e = x / 10; //进位,如果x大于9,进位1
x = x % 10; //进位后的x
sc.push_back(x + '0'); //注意,这儿不能直接写 sc.at(i) = x + '0', sc的空间大小此时是0
i++;
}
while(i < Len_sa)
{
int x = (sa.at(i) - '0') + e;
e = x / 10; //进位,如果x大于9,进位1
x = x % 10; //进位后的x
sc.push_back(x + '0');
i++;
}
while(i < Len_sb)
{
int x = (sb.at(i) - '0') + e;
e = x / 10; //进位,如果x大于9,进位1
x = x % 10; //进位后的x
sc.push_back(x + '0');
i++;
}
if(e == 1) //最后的进位,如果是1,回到字符串最后
{
sc.push_back(e + '0');
}
invert(sc);
c.val = sc;
return c;
}
int main(){
BigInt a, b, c;
cin>>a>>b;
c=a+b;
cout<<a<<"+"<<b<<"="<<c<<endl;
return 0;
}