program maximize
  implicit none
  integer :: a, b, c
  integer :: lower, middle, upper
  read(*,*) a, b, c

  upper = max(a,b,c)
  lower = min(a,b,c)
  middle = a+b+c-upper-lower

  write(*,'(i0)') 10*upper+middle+lower
  stop
end program maximize
