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

namespace ConsoleApp2
{
    class Program
    {
        public static int Veci(int a, int b, int c)
        {
            if (Convert.ToInt32(string.Format("{0}{1}{2}", a, b, c)) >= Convert.ToInt32(string.Format("{0}{1}{2}", a, c, b))) 
                return Convert.ToInt32(string.Format("{0}{1}{2}", a, b, c));                                                  
            else return Convert.ToInt32(string.Format("{0}{1}{2}", a, c, b));                                                 
        }
        public static int BrojD(int a, int b, int c)
        {
            if (Veci(a, b, c) >= Veci(b, a, c) && (Veci(a, b, c) >= Veci(c, a, b)))
            {
                return Veci(a, b, c);
            }
            else if (Veci(b, a, c) >= Veci(a, b, c) && (Veci(b, a, c) >= Veci(c, a, b)))
            {
                return Veci(b, a, c);
            }
            else if (Veci(c, a, b) >= Veci(a, b, c) && (Veci(c, a, b) >= Veci(b, a, c)))
            {
                return Veci(c, a, b);
            }
            else return 0;
        }
        static void Main(string[] args)
        {
            int a, b, c, d;
            a = Convert.ToInt32(Console.ReadLine());
            b = Convert.ToInt32(Console.ReadLine());
            c = Convert.ToInt32(Console.ReadLine());
            d = Convert.ToInt32(BrojD(a, b, c));

            Console.WriteLine(d);
        }
        
    }
}