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

namespace ConsoleApplication20
{
    class Program
    {
        static void funk(string s1, string s2, string s3, string s, int br, ref int max)
        {
            if (br == 0)
            {
                if (max < int.Parse(s))
                    max = int.Parse(s);
            }
            if (br > 0)
            {
                if (s1 != "") funk("", s2, s3, s + s1, br-1, ref max);
                if (s2 != "") funk(s1, "", s3, s + s2, br-1, ref max);
                if (s3 != "") funk(s1, s2, "", s + s3, br-1, ref max);
            }
        }
        static void Main(string[] args)
        {
            string[] us = Console.ReadLine().Split();
            string s1 = us[0];
            string s2 = us[1];
            string s3 = us[2];
            string s = "";
            int max = 0;
            funk(s1, s2, s3, s, 3,ref max);
            Console.WriteLine(max);
            

        }
    }
}