'use strict';
const main = input => {
  input = input[0].split(' ').map(val => parseInt(val));
  let ans = input.reduce((prev, current) => prev + current);  
  ans += Math.max(...input)*9;
  // console.log(input);
  
  console.log(ans);
  
}
main(require("fs").readFileSync("/dev/stdin", "utf8").split('\n'));