#include <stdio.h>
void sudar(int x, int y, int z)
{
int n=1,c1,c2,c3=1,br=0;
z=0;
while(x>0 || y>0)
{
c1=x%10;
x=x/10;
c2=y%10;
y=y/10;
if(c1>c2)
c3=c1;
else
if(c1<c2)
c3=c2;
else
if(c1==0)
c3=c2;
else
if(c2==0)
c3=c1;
else
if(c1==c2)
{
c3=c1;
z+=c3*n;
n*=10;
}
z+=c3*n;
n*=10;
br++;
}
printf("%d\n",z);
}
int main()
{
int x,y,broj3;
printf("unesi x i y");
scanf("%d%d",&x,&y);

sudar(x,y,broj3);
}