#include <stdio.h>
#include <stdlib.h>
#include <math.h>

int main()
{
    unsigned long long a,b,c,i,i1,i2,max,sre,min,novi_broj,bra=0,brb=0,brc=0,a1,b1,c1,a2,b2,c2,in=1,brmax,brsre,brmin,maxtest,mintest;
    scanf("%lld %lld %lld",&a,&b,&c);
    a1=a;
    b1=b;
    c1=c;
    a2=a;
    b2=b;
    c2=c;
    while(a1>0)
        {
        a1/=10;
        bra++;
        }
    while(b1>0)
        {
        b1/=10;
        brb++;
        }
    while(c1>0)
        {
        c1/=10;
        brc++;
        }
    LOOP:
    {
    for(i=in;i<bra;++i)
        {
        a2/=10;
        }
    for(i=in;i<brb;++i)
        {
        b2/=10;
        }
    for(i=in;i<brc;++i)
        {
        c2/=10;
        }
    }
if(a2!=b2 && b2!=c2 && c2!=a2)
        {
   if(a2>b2)
        {
        maxtest=a2;
        mintest=b2;
        max=a;brmax=bra;
        min=b;brmin=brb;
        sre=c;brsre=brc;
        }
    else
        {
        maxtest=b2;
        mintest=a2;
        max=b;brmax=brb;
        min=a;brmin=bra;
        sre=c;brsre=brc;
        }
    if(c2>maxtest && max==a)
        {
        max=c;brmax=brc;
        sre=a;brsre=bra;
        }
    else if(c2>maxtest && max==b)
        {
        max=c;brmax=brc;
        sre=b;brsre=brb;
        }
    else if(c2<mintest && min==a)
        {
        min=c;brmin=brc;
        sre=a;brsre=bra;
        }
    else if(c2<mintest && min==b)
        {
        min=c;brmin=brc;
        sre=b;brsre=brb;
        }
    }
else if(a2==b2)
        {
        if(b2>c2)
        {
        max=b;brmax=brb;
        min=c;brmin=brc;
        sre=a;brsre=bra;
        }
    else
        {
        max=c;brmax=brc;
        min=b;brmin=brb;
        sre=a;brsre=bra;
        }
        }
else if(b2==c2)
    {
    if(c2>a2)
        {
        max=c;brmax=brc;
        min=a;brmin=bra;
        sre=b;brsre=brb;
        }
    else
        {
        max=a;brmax=bra;
        min=c;brmin=brc;
        sre=b;brsre=brb;
        }
    }
else if(c2==a2)
    {
    if(a2>b2)
        {
        max=a;brmax=bra;
        min=b;brmin=brb;
        sre=c;brsre=brc;
        }
    else
        {
        max=b;brmax=brb;
        min=a;brmin=bra;
        sre=c;brsre=brc;
        }
    }
if(min>sre)
    {
    min+=sre;
    sre=min-sre;
    min=min-sre;
    }
if(in>bra && in>brb && in>brc)
    {
    novi_broj=a*pow(10,brsre+brmin)+a*pow(10,brmin)+a;
    printf("%lld",novi_broj);
    return 0;
    }
if(a2==b2 && b2==c2 && c2==a2)
        {
        in++;
        a2=a;
        b2=b;
        c2=c;
        goto LOOP;
        }
    novi_broj=max*pow(10,brsre+brmin)+sre*pow(10,brmin)+min;
    printf("%lld",novi_broj);
return 0;
}