#include<iostream>

using namespace std;

int main()
{
    unsigned int A, B, C, max=0, niz[6], vr;
    int pom1=1, pom2=1;
    cin>>A>>B>>C;
    for(int i=0; i<6; i++)
    {
    	pom1=1;
    	pom2=1;
    	niz[i]=0;
    	if(i<2)
    	{
    		if(i==0)
    		{
    			vr=B;
    		    while(vr>=10)
    		    {
    			    pom1=pom1*10;
    			    vr=vr/10;
			    }
			    vr=C;
    		    while(vr>=10)
    		    {
    			    pom2=pom2*10;
    			    vr=vr/10;
			    }
			    vr=A*(pom1*10*pom2*10);
			    niz[i]=niz[i]+vr;
			    vr=B*(pom2*10);
			    niz[i]=niz[i]+vr;
			    niz[i]=niz[i]+C;
		    }
		    else
		    {
		    	vr=C;
    		    while(vr>=10)
    		    {
    			    pom1=pom1*10;
    			    vr=vr/10;
			    }
			    vr=B;
    		    while(vr>=10)
    		    {
    			    pom2=pom2*10;
    			    vr=vr/10;
			    }
			    vr=A*(pom1*10*pom2*10);
			    niz[i]=niz[i]+vr;
			    vr=C*(pom2*10);
			    niz[i]=niz[i]+vr;
			    niz[i]=niz[i]+B;
			}
		}
		else
		{
			if(i>1 && i<4)
			{
				if(i==2)
				{
					vr=A;
    		        while(vr>=10)
    		        {
    			        pom1=pom1*10;
    			        vr=vr/10;
			        }
			        vr=C;
    		        while(vr>=10)
    		        {
    			        pom2=pom2*10;
    			        vr=vr/10;
			        }
			        vr=B*(pom1*10*pom2*10);
			        niz[i]=niz[i]+vr;
			        vr=A*(pom2*10);
			        niz[i]=niz[i]+vr;
			        niz[i]=niz[i]+C;
				}
				else
				{
					vr=C;
    		        while(vr>=10)
    		        {
    			        pom1=pom1*10;
    			        vr=vr/10;
			        }
			        vr=A;
    		        while(vr>=10)
    		        {
    			        pom2=pom2*10;
    			        vr=vr/10;
			        }
			        vr=B*(pom1*10*pom2*10);
			        niz[i]=niz[i]+vr;
			        vr=A*(pom2*10);
			        niz[i]=niz[i]+vr;
			        niz[i]=niz[i]+C;
				}
			}
			else
			{
				if(i==4)
				{
					vr=A;
    		        while(vr>=10)
    		        {
    			        pom1=pom1*10;
    			        vr=vr/10;
			        }
			        vr=B;
    		        while(vr>=10)
    		        {
    			        pom2=pom2*10;
    			        vr=vr/10;
			        }
			        vr=C*(pom1*10*pom2*10);
			        niz[i]=niz[i]+vr;
			        vr=A*(pom2*10);
			        niz[i]=niz[i]+vr;
			        niz[i]=niz[i]+B;
				}
				else
				{
					vr=B;
    		        while(vr>=10)
    		        {
    			        pom1=pom1*10;
    			        vr=vr/10;
			        }
			        vr=A;
    		        while(vr>=10)
    		        {
    			        pom2=pom2*10;
    			        vr=vr/10;
			        }
			        vr=C*(pom1*10*pom2*10);
			        niz[i]=niz[i]+vr;
			        vr=B*(pom2*10);
			        niz[i]=niz[i]+vr;
			        niz[i]=niz[i]+A;
				}
			}
		}
	}
	for(int i=0; i<6; i++)
	{
		if(niz[i]>max)
		{
			max=niz[i];
		}
	}
	cout<<endl<<max;
    return 0;
}