open Printf
open Scanf

let id x = x
let pair x y = x, y

let vs = scanf "%d %d %d" (fun x y z -> [|x; y; z|])

let () = Array.sort compare vs

let () =
  let x = vs.(2) * 10 + vs.(1) + vs.(0) in
  printf "%d\n" x
