results :: Int -> Int -> Int -> [Int]
results a b c = [a + 10*b + c, 10*a + b + c]

main = do
  [a,b,c] <- map read.words <$> getLine
  print $ maximum $ concat $ map (\(x,y,z) -> results x y z) [(a,b,c), (a,c,b), (b,a,c), (b,c,a), (c,a,b), (c,b,a)]