
function Main(input) {

	const L = input.split(" ").map(x => parseInt(x, 10));
	
	console.log(L[0] + L[1] + L[2] + 9 * L.reduce( (a, b) => Math.max(a, b) ));
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));