s = raw_input().split() a = 0 for i in range(10): for j in s: if j==str(i): a += i print a