A,B,C=list(map(int,input().split()))



print((max(A,B,C)*9+A+B+C))
A,B,C=list(map(int,input().split()))



maxa=max(A,B,C)



print((maxa*9+A+B+C))
A, B, C = list(map(int, input().split()))
print((max(A, B, C) * 9 + A + B + C))

A, B, C = list(map(int, input().split()))
maxa = max(A, B, C)
print((maxa * 9 + A + B + C))

-print((max(A, B, C) * 9 + A + B + C)) +maxa = max(A, B, C) +print((maxa * 9 + A + B + C))