string a;
            string b;
            string c;

            a = Console.ReadLine();
            b = Console.ReadLine();
            c = Console.ReadLine();
            long max;
            max = Convert.ToInt64(a + b + c);
            if (max < Convert.ToInt64(a + c + b))
            {
                max = Convert.ToInt64(a + c + b);
            }
            if (max < Convert.ToInt64(b+a+c))
            {
                max = Convert.ToInt64(b + a + c);
            }
            if (max < Convert.ToInt64(b+c+a))
            {
                max = Convert.ToInt64(b + c + a);
            }
            if (max < Convert.ToInt64(c+a+b))
            {
                max = Convert.ToInt64(c + a + b);
            }
            if (max < Convert.ToInt64(c+b+a))
            {
                max = Convert.ToInt64(c + b + a);
            }
            Console.WriteLine(max);