Problem:
Score : 100 points

Problem Statement

You have decided to give an allowance to your child depending on the outcome of the game that he will play now.

The game is played as follows:

There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a + printed on it.

The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)

Then, the amount of the allowance will be equal to the resulting value of the formula.

Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.

Constraints

All values in input are integers.

1 \leq A, B, C \leq 9

Input

Input is given from Standard Input in the following format:

A B C

Output

Print the maximum possible amount of the allowance.

Sample Input 1

1 5 2

Sample Output 1

53

The amount of the allowance will be 53 when the panels are arranged as 52+1, and this is the maximum possible amount.

Sample Input 2

9 9 9

Sample Output 2

108

Sample Input 3

6 6 7

Sample Output 3

82

Solution in JavaScript (node.js v5.12) (judge verdict: Wrong Answer)

// inputに入力データ全体が入る, 10)
function Main(input) {
	var A = parseInt(input.split(' ')[0], 10);
	var B = parseInt(input.split(' ')[1], 10);
	var C = parseInt(input.split(' ')[2], 10);
	var strA = input.split(' ')[0];
	var strB = input.split(' ')[1];
	var strC = input.split(' ')[2];
	var results = [];
	results[0] = A + parseInt(strB+strC, 10);
	results[1] = A + parseInt(strC+strB, 10);
	results[2] = B + parseInt(strA+strC, 10);
	results[3] = B + parseInt(strC+strA, 10);
	results[4] = C + parseInt(strA+strB, 10);
	results[5] = C + parseInt(strB+strA, 10);
	results[6] = parseInt(strB+strC, 10) + A;
	results[7] = parseInt(strC+strB, 10) + A;
	results[8] = parseInt(strA+strC, 10) + B;
	results[9] = parseInt(strC+strA, 10) + B;
	results[10] = parseInt(strA+strB, 10) + C;
	results[11] = parseInt(strB+strA, 10) + C;
	console.log(Math.max(...results))
}

// ※この行以降は編集しない (標準入力から一度に読み込みMainを呼び出します)
Main(require("fs").readFileSync("/dev/stdin", "utf8"));