#include <iostream>
#include <string>
#include <stdlib.h>

using namespace std;

main()
{
   string a, b, c, n, ab1, ab2, abc1, abc2, br;
   int k, l, m, i, j, x, y;

   cin >> a;
   cin >> b;
   cin >> c;


   k=atoi(a.c_str());
   l=atoi(b.c_str());
   m=atoi(c.c_str());

   ab1=a+b;
   ab2=b+a;

   i=atoi(ab1.c_str());
   j=atoi(ab2.c_str());

   if(i<j)
   {
       n=ab2;
   }
   else n=ab1;

   abc1=n+c;
   abc2=c+n;

   x=atoi(abc1.c_str());
   y=atoi(abc2.c_str());

   if(x<y)
   {
       br=abc2;
   }
   else br=abc1;

   cout << br;
}