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

int * combine(unsigned long long A, unsigned long long B, unsigned long long C)
{
    
    int *com = (int *) malloc(57*sizeof(int));
    
    unsigned long long T=A;
    int L=0;
    while(T>0)
    {
        L++;
        T=T/10;
    }
    
    int d=0;
    T=A;
    
    while(T>0)
    {
        com[L-d-1]=(int)(T%10);
        T=T/10;
        d++;
    }
    
    T=B;
    while(T>0)
    {
        L++;
        T=T/10;
    }
    
    d=0;
    T=B;
    
    while(T>0)
    {
        com[L-d-1]=(int)(T%10);
        T=T/10;
        d++;
    }
    
    T=C;
    while(T>0)
    {
        L++;
        T=T/10;
    }
    
    d=0;
    T=C;
    
    while(T>0)
    {
        com[L-d-1]=(int)(T%10);
        T=T/10;
        d++;
    }
    
    
    return com;
}

int compare(int *c1, int *c2, int *c3, int *c4, int *c5, int *c6, int an, int bn, int l)
{
    int *a;
    if(an==1)
        a=c1;
    else if(an==2)
        a=c2;
    else if(an==3)
        a=c3;
    else if(an==4)
        a=c4;
    else if(an==5)
        a=c5;
    else if(an==6)
        a=c6;
    
    int *b;
    if(bn==1)
        b=c1;
    else if(bn==2)
        b=c2;
    else if(bn==3)
        b=c3;
    else if(bn==4)
        b=c4;
    else if(bn==5)
        b=c5;
    else if(bn==6)
        b=c6;
    
    for(int i=0; i<l; i++)
    {
        if(a[i]>b[i])
            return 0;
        else if(b[i]>a[i])
            return 1;
    }
    
    return 0;
}




int main()
{
    
    unsigned long long A, B, C;
    scanf("%llu%llu%llu", &A, &B, &C);
    
    int *c1 = combine(A, B, C);
    int *c2 = combine(A, C, B);
    int *c3 = combine(B, A, C);
    int *c4 = combine(B, C, A);
    int *c5 = combine(C, A, B);
    int *c6 = combine(C, B, A);
    
    int l=0;
    while(A>0)
    {
        A=A/10;
        l++;
    }
    while(B>0)
    {
        B=B/10;
        l++;
    }
    while(C>0)
    {
        C=C/10;
        l++;
    }
    
    
    int max=1;
    if(compare(c1, c2, c3, c4, c5, c6, max, 2, l)==1)
        max=2;
    if(compare(c1, c2, c3, c4, c5, c6, max, 3, l)==1)
        max=3;
    if(compare(c1, c2, c3, c4, c5, c6, max, 4, l)==1)
        max=4;
    if(compare(c1, c2, c3, c4, c5, c6, max, 5, l)==1)
        max=5;
    if(compare(c1, c2, c3, c4, c5, c6, max, 6, l)==1)
        max=6;
    
    if(max==1)
        for(int i=0; i<l; i++)
            printf("%d", c1[i]);
    if(max==2)
        for(int i=0; i<l; i++)
            printf("%d", c2[i]);
    if(max==3)
        for(int i=0; i<l; i++)
            printf("%d", c3[i]);
    if(max==4)
        for(int i=0; i<l; i++)
            printf("%d", c4[i]);
    if(max==5)
        for(int i=0; i<l; i++)
            printf("%d", c5[i]);
    if(max==6)
        for(int i=0; i<l; i++)
            printf("%d", c6[i]);
    
    
    return 0;
}