#ABC110A. Maximize the Formula

Maximize the Formula

题目描述

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 11 and 99 (inclusive) printed on it, and one "operator panel" with a + printed on it.
  • The player should construct a formula of the form X+YX + 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,BA, B and CC printed on the integer panels used in the game, find the maximum possible amount of the allowance.

您决定根据孩子现在玩的游戏的结果给他零花钱。

游戏规则如下

  • 有三个 "整数面板",每个面板上都印有一个介于 1199 之间的数字,还有一个印有 "+"的 "运算符面板"。
  • 选手应将这四块板从左到右排列,构造出一个 X+YX + Y 形式的公式。(操作面板不应放在公式的两端)。
  • 然后,津贴金额将等于公式的结果值。

给定游戏中使用的整数面板上打印的值 A,BA, BCC ,求津贴的最大可能金额。

输入格式

输入内容按以下格式标准输入:

AA BB CC

输出格式

打印津贴的最大可能金额。

样例 #1

样例输入 #1

1 5 2

样例输出 #1

53

样例 #2

样例输入 #2

9 9 9

样例输出 #2

108

样例 #3

样例输入 #3

6 6 7

样例输出 #3

82

说明

数据规模与约定

  • 输入值均为整数。
  • 1A,B,C91 \leq A, B, C \leq 9

样例 11 解释

当面板排列为 "52+1 "时,补贴金额为 5353 ,这是可能的最大金额。