#include <bits/stdc++.h>

using namespace std;

int stepen(int x,int y){
    int rez=1;
    for(int i=0;i<y;i++){
        rez*=x;
    }
    return rez;
}

int brCifara(long long a){
    int rez=1;
    while(a>9){
        rez++;
        a/=10;
    }
    return rez;
}

long long uporedi(long long a,long long b){
    int i=1;
    int cifa = a/stepen(10,(brCifara(a)-i));
    int cifb = b/stepen(10,(brCifara(b)-i));

    while(cifa==cifb && i<=brCifara(a) && i<=brCifara(b)){
        i++;
        cifa = a/stepen(10,(brCifara(a)-i));
        cifb = b/stepen(10,(brCifara(b)-i));
    }

    if(cifa>cifb && i<brCifara(a) && i<brCifara(b)){
        return a;
    }else if(cifa<cifb && i<brCifara(a) && i<brCifara(b)){
        return b;
    }else{
        if(i-1==brCifara(a) && i-1==brCifara(b)){
            return a;
        }else if(i-1==brCifara(a)){
            if(b%10>a/stepen(10,(brCifara(a)-1)) || b/stepen(10,(brCifara(b)-1))>a/stepen(10,(brCifara(a)-1))){
                return b;
            }
            return a;
        }else{
            if(a%10>b/stepen(10,(brCifara(b)-1)) || b/stepen(10,(brCifara(b)-1))<a/stepen(10,(brCifara(a)-1))){
                return a;
            }
            return b;
        }
    }
}

int nadjiIdx(long long brojevi[],int n,int is[],long long x){
    for(int i=0;i<3;i++){
        if(brojevi[i]==x && !is[i]){
            return i;
        }
    }
}

long long maks(long long brojevi[],int is[],int n){
    long long pom,rez=0;
    for(int i=0;i<n;i++){
        if(!is[i] && rez!=0){
            rez = brojevi[i];
        }
    }

    for(int i=0;i<n;i++){
        if(!is[i]){
            pom = uporedi(rez,brojevi[i]);
            if(pom!=rez){
                rez=pom;
            }
        }
    }

    is[nadjiIdx(brojevi,3,is,rez)]=1;
    return rez;
}

int main()
{
    long long brojevi[3],br=0;
    int is[3],cif,k=1,pos=0,pos1=0;

    for(int i=0;i<3;i++){
        cin >> brojevi[i];
        is[i]=0;
    }

    int l = brCifara(brojevi[0])+brCifara(brojevi[1])+brCifara(brojevi[2]);
    int rez[l];

    for(int i=0;i<3;i++){
        br += maks(brojevi,is,3);
        pos1+=brCifara(br);
        while(br>0){
            cif = br%10;
            rez[pos+pos1-k]=cif;
            br/=10;
            k++;
        }
        pos=pos1;
        br=0;
    }

    for(int i=0;i<l;i++){
        printf("%d",rez[i]);
    }
    
    return 0;
}