void mydiv(char a[],char b[], vector&v)
{
int len_a = strlen(a)-1;
int len_b = strlen(b)-1;
int tmp;
char buf[500];
if (len_a < len_b)
{
strcpy(buf, a);
strcpy(a, b);
strcpy(b, buf);
}
len_a = strlen(a) - 1;
len_b = strlen(b) - 1;
for (int j = 0,k=len_b; j <= k; j++)
{
tmp = *(a + len_a) - 48 - (*(b + len_b) - 48);
if (tmp < 0)
{
tmp += 10;
*(a + len_a - 1) = *(a + len_a - 1) - 1;
}
len_a--;
len_b--;
v.push_back(tmp);
}
while (len_a >= 0)
{
v.push_back(*(a + len_a)-48);
len_a--;
}
}
void myadd(char a[], char b[], vector&v)
{
int len_a=strlen(a)-1;
int len_b = strlen(b)-1;
int tmp;
char buf[500];
if (len_a < len_b)
{
strcpy(buf, a);
strcpy(a, b);
strcpy(b, buf);
}
len_a = strlen(a) - 1;
len_b = strlen(b) - 1;
int min = len_a < len_b ? len_a : len_b;
int buf1 = 0;
for (int i = 0; i <=min; i++)
{
tmp = *(a + len_a)-48+(*(b + len_b) - 48)+buf1;
buf1 = 0;
if (tmp >=10)
{
tmp -= 10;
buf1 = 1;
}
len_a--;
len_b--;
v.push_back(tmp);
}
while (len_a > -1)
{
tmp = *(a + len_a) - 48 + buf1;
buf1 = 0;
if (tmp >= 10)
{
tmp -= 10;
buf1 = 1;
}
len_a--;
v.push_back(tmp);
}
if (len_a == -1 && buf1==1) v.push_back(1);
}
/*高精度加减法*/
int main()
{
char a[500] = { 0 };
char b[500] = { 0 };
vectorv;
cin >> a >> b;
//if (strlen(a) < strlen(b)) cout << '-';
//mydiv(a, b, v);
myadd(a, b, v);
for (int i = v.size()-1; i >= 0; i--)
{
cout << v[i];
}
cout << endl;
return 0;
}