using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            string a = Console.ReadLine();
            string b = Console.ReadLine();
            string c = Console.ReadLine();
            string d = a + b + c;
            string e = a + c + b;
            string f = b + a + c;
            string g = b + c + a;
            string h = c + a + b;
            string j = c + b + a;
            int D = Convert.ToInt32(d);
            int E = Convert.ToInt32(e);
            int F = Convert.ToInt32(f);
            int G = Convert.ToInt32(g);
            int H = Convert.ToInt32(h);
            int J = Convert.ToInt32(j);

            if (D >= E && D >= F && D >= G && D >= H && D >= J)
            {
                Console.WriteLine(D);
            }
            else if (E >= D && E >= F && E >= G && E >= H && E >= J)
            {
                Console.WriteLine(E);
            }
            else if (F >= E && F >= D && F >= G && F >= H && F >= J)
            {
                Console.WriteLine(F);
            }
            else if (G >= E && G >= F && G >= D && G >= H && G >= J)
            {
                Console.WriteLine(G);
            }
            else if (H >= E && H >= F && H >= G && H >= D && H >= J)
            {
                Console.WriteLine(H);
            }
            else
            {
                Console.WriteLine(J);
            }

        } 
    }
}