#include<iostream>
using namespace std;
class Complex
{
int real;
int imag;
public:
Complex()
{
real = 0;
imag = 0;
}
Complex(double r, double i)
{
real = r;
imag = i;
}
Complex Addcom(Complex c2)
{
(*this).real+= c2.real;
(*this).imag += c2.imag;
return *this;
}
void OutCom()
{
if (real == 0 && imag != 0)
cout << imag << "i";
else if (imag == 0)
{
cout << real;
}
else
cout << real << "+" << imag << "i";
}
};
int main()
{
int a, b, c, d;
cin >> a >> b >> c >> d;
Complex cx(1, 2);
Complex cy(3, 4);
cx. Addcom(cy);
cx.OutCom();
return 0;
}