A = [int(x) for x in input().split()] if sum(A) > (max(A) * 3): print(sum(A)) else: print(max(A) * 3)