# your code goes here
import sys

dice_list = [int(i) for i in sys.stdin.readline().split()]
my_dict = {}

for i in dice_list:
    if i not in my_dict:
        my_dict[i] = 1
    else:
        my_dict[i] += 1
# print(my_dict)
price = 0
for i in my_dict:
    # print(i)
    if my_dict[i] > 1:
        if my_dict[i] == 3:
            price = 10000 + (i * 1000)
        else:
            price = 1000 + (i * 100)
        break
    else:
        price = max(my_dict.keys()) * 100
        break

print(price)