rgb = list(map(int, input().split())) while True: rgb.sort() if rgb[0] + 3 > rgb[2]: break rgb[0] += 1 rgb[2] -= 2 print(rgb[0])